QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 2635|回复: 15

sudo问题 (已解决)

[复制链接]
发表于 2005-4-24 15:08:49 | 显示全部楼层 |阅读模式
sudo aptitude install gdb
sudo: unable to lookup debian via gethostbyname()
我的sudoers文件:

yueliangdao@1[etc]$ cat sudoers
# /etc/sudoers
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the man page for details on how to write a sudoers file.
#

# Host alias specification

# User alias specification

# Cmnd alias specification

# User privilege specification
root    ALL = (ALL) ALL
yueliangdao ALL = (ALL)  ALL
:D

我的sylpheed中的配置全不见了,而且 看下面:





[code:1]
正在设置 exim4-config (4.50-4) ...
Error: Unsplit config selected and /etc/exim4/exim4.conf.template missing ... exiting
dpkg:处理 exim4-config (--configure)时出错:
子进程?post-installation script?返回了错误号?1
dpkg:依赖关系问题使得 exim4-base 的配置工作不能继续:
exim4-base 依赖于 exim4-config (>= 4.30) | exim4-config-2;然而:
  软件包 exim4-config还没有被配置。
  软件包 exim4-config-2还没有被安装。
  软件包 exim4-config 提供了 exim4-config-2还没有被配置。
dpkg:处理 exim4-base (--configure)时出错:
依赖关系问题 - 仍未被配置
dpkg:依赖关系问题使得 eximon4 的配置工作不能继续:
eximon4 依赖于 exim4-base (>= 4.10);然而:
  软件包 exim4-base还没有被配置。
dpkg:处理 eximon4 (--configure)时出错:
依赖关系问题 - 仍未被配置
dpkg:依赖关系问题使得 exim4-daemon-light 的配置工作不能继续:
exim4-daemon-light 依赖于 exim4-base (>= 4.50);然而:
  软件包 exim4-base还没有被配置。
dpkg:处理 exim4-daemon-light (--configure)时出错:
依赖关系问题 - 仍未被配置
dpkg:依赖关系问题使得 exim4 的配置工作不能继续:
exim4 依赖于 exim4-base (>= 4.50);然而:
  软件包 exim4-base还没有被配置。
exim4 依赖于 exim4-daemon-light | exim4-daemon-heavy | exim4-daemon-custom;然 而:
  软件包 exim4-daemon-light还没有被配置。
  软件包 exim4-daemon-heavy还没有被安装。
  软件包 exim4-daemon-custom还没有被安装。
dpkg:处理 exim4 (--configure)时出错:
依赖关系问题 - 仍未被配置
在处理时有错误发生:
exim4-config
exim4-base
eximon4
exim4-daemon-light
exim4
E: Sub-process /usr/bin/dpkg returned an error code (1)
啊!安装软件包时出现某些坏情况。正在试图恢复:
正在设置 exim4-config (4.50-4) ...
Error: Unsplit config selected and /etc/exim4/exim4.conf.template missing ... exiting
dpkg:处理 exim4-config (--configure)时出错:
子进程?post-installation script?返回了错误号?1
dpkg:依赖关系问题使得 exim4-base 的配置工作不能继续:
exim4-base 依赖于 exim4-config (>= 4.30) | exim4-config-2;然而:
  软件包 exim4-config还没有被配置。
  软件包 exim4-config-2还没有被安装。
  软件包 exim4-config 提供了 exim4-config-2还没有被配置。
dpkg:处理 exim4-base (--configure)时出错:
依赖关系问题 - 仍未被配置
dpkg:依赖关系问题使得 exim4-daemon-light 的配置工作不能继续:
exim4-daemon-light 依赖于 exim4-base (>= 4.50);然而:
  软件包 exim4-base还没有被配置。
dpkg:处理 exim4-daemon-light (--configure)时出错:
依赖关系问题 - 仍未被配置
dpkg:依赖关系问题使得 eximon4 的配置工作不能继续:
eximon4 依赖于 exim4-base (>= 4.10);然而:
  软件包 exim4-base还没有被配置。
dpkg:处理 eximon4 (--configure)时出错:
依赖关系问题 - 仍未被配置
dpkg:依赖关系问题使得 exim4 的配置工作不能继续:
exim4 依赖于 exim4-base (>= 4.50);然而:
  软件包 exim4-base还没有被配置。
exim4 依赖于 exim4-daemon-light | exim4-daemon-heavy | exim4-daemon-custom;然 而:
  软件包 exim4-daemon-light还没有被配置。
  软件包 exim4-daemon-heavy还没有被安装。
  软件包 exim4-daemon-custom还没有被安装。
dpkg:处理 exim4 (--configure)时出错:
依赖关系问题 - 仍未被配置
在处理时有错误发生:
exim4-config
exim4-base
exim4-daemon-light
eximon4
exim4
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取扩展状态文件
正在初始化软件包状态... 完成
正在读取任务描述... 完成

root@0[yueliangdao]# dpkg -l exim4
期望状态=未知(u)/安装(i)/删除(r)/清除(p)/保持(h)
| 当前状态=未(n)/已安装(i)/仅存配置(c)/仅解压缩(U)/配置失败(F)/不完全安装(H)
|/ 错误?=(无)/保持(?)/须重装(R)/两者兼有(#) (状态,错误:大写=故障)
||/ 名称           版本           简介
+++-==============-==============-============================================
iU  exim4          4.50-4         metapackage to ease exim MTA (v4) installati



root@0[yueliangdao]# dpkg -l exim4*
期望状态=未知(u)/安装(i)/删除(r)/清除(p)/保持(h)
| 当前状态=未(n)/已安装(i)/仅存配置(c)/仅解压缩(U)/配置失败(F)/不完全安装(H)
|/ 错误?=(无)/保持(?)/须重装(R)/两者兼有(#) (状态,错误:大写=故障)
||/ 名称           版本           简介
+++-==============-==============-============================================
iU  exim4          4.50-4         metapackage to ease exim MTA (v4) installati
iU  exim4-base     4.50-4         support files for all exim MTA (v4) packages
iF  exim4-config   4.50-4         configuration for the exim MTA (v4)
un  exim4-config-2 <无>           (无相关介绍)
un  exim4-daemon-c <无>           (无相关介绍)
pn  exim4-daemon-h <无>           (无相关介绍)
iU  exim4-daemon-l 4.50-4         lightweight exim MTA (v4) daemon
pn  exim4-doc-html <无>           (无相关介绍)
pn  exim4-doc-info <无>           (无相关介绍)
root@0[yueliangdao]# dpkg-reconfigure exim4-config
/usr/sbin/dpkg-reconfigure: exim4-config 已被损坏或未完成安装
root@0[yueliangdao]#

[/code:1]       
发表于 2005-4-24 16:21:59 | 显示全部楼层
这个问题我最开始用sudo的时候也遇到过,最后通过google在一个国外的网站上找到的答案!
[code:1]
you must match /proc/sys/kernel/hostname with the name in /etc/hosts.

if the name in /etc/hosts is localhost, then modify /proc/sys/kernel/hostname by type
#echo "localhost">>/proc/sys/kernel/hostname
or

you can modify /etc/hosts to be the same host with /proc/sys/kernel/hostname

and type the command:
visudo
then increase the following sentence:
zhyfly ALL=NOPASSWD:ALL[/code:1]
回复

使用道具 举报

 楼主| 发表于 2005-4-27 09:21:43 | 显示全部楼层
回去试试!
回复

使用道具 举报

 楼主| 发表于 2005-4-28 08:03:33 | 显示全部楼层
不好意思 ?!!没有解决!           
回复

使用道具 举报

 楼主| 发表于 2005-4-28 08:09:45 | 显示全部楼层
我的/etc/hosts::

127.0.0.1 localhost

# The following lines are desirable for IPv6 capable hosts
# (added automatically by netbase upgrade)

::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
debian

/proc/sys/kernel/hostname:
debian
回复

使用道具 举报

 楼主| 发表于 2005-4-28 08:12:27 | 显示全部楼层
我的/etc/hosts::

127.0.0.1 localhost

# The following lines are desirable for IPv6 capable hosts
# (added automatically by netbase upgrade)

::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
debian

/proc/sys/kernel/hostname:
debian
回复

使用道具 举报

 楼主| 发表于 2005-4-28 08:15:36 | 显示全部楼层
sudo aptitude install gdb
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取扩展状态文件
正在初始化软件包状态... 完成
正在读取任务描述... 完成
下列软件包已经被阻止升级:
  abiword-common abiword-gnome abiword-help acroread acroread-plugins
  bacula-common bacula-fd base-config chmsee gnome-volume-manager gnucash
  gnucash-common gtk-engines-smooth gtk2-engines-smooth
  libapache2-mod-perl2 libcupsys2-gnutls10 libcurl3 libdbd-mysql-perl
  libqt3c102-mt libqt3c102-mt-mysql libqt3c102-mt-odbc libqt3c102-mt-psql
  libshout3 mozilla-acroread pmount
0 个软件包被升级,新安装0 个,0 个将被删除, 同时 25 个将不升级。
需要获取 0B 的存档。解包后将要使用 0B。
正在编辑扩展状态信息... 完成
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取扩展状态文件
正在初始化软件包状态... 完成
正在读取任务描述... 完成
yueliangdao@0[kernel]$
在google上找到了答案!


解决方法echo "127.0.0.1 debian localhost.localdomain localhost " >> /etc/hosts
回复

使用道具 举报

发表于 2005-4-28 09:32:22 | 显示全部楼层
you must match /proc/sys/kernel/hostname with the name in /etc/hosts.

对啊,只要这两个match就行!
回复

使用道具 举报

 楼主| 发表于 2005-4-28 11:06:39 | 显示全部楼层
help?????!!!!!!!!!
回复

使用道具 举报

发表于 2005-4-28 17:25:19 | 显示全部楼层
[quote:8603c3cfb7="yttlovezxx"]help?????!!!!!!!!![/quote]
exim4?这个发邮件的,我都直接删除!
回复

使用道具 举报

 楼主| 发表于 2005-5-2 14:24:40 | 显示全部楼层
[quote:a4deb42cc1="zhy2111314"][quote:a4deb42cc1="yttlovezxx"]help?????!!!!!!!!![/quote]
exim4?这个发邮件的,我都直接删除![/quote]


exim4不是与debian系统关系密切吗?删了后系统不是over了??
回复

使用道具 举报

发表于 2005-5-2 22:12:33 | 显示全部楼层
没有啊!我网络安装完debian后都实先把exim4删除的!
回复

使用道具 举报

 楼主| 发表于 2005-5-3 22:24:25 | 显示全部楼层
明天再试试!。。。。。。。。。。。。。。。。。。。。   
回复

使用道具 举报

发表于 2005-5-5 09:37:14 | 显示全部楼层
现在怎么样了?
回复

使用道具 举报

 楼主| 发表于 2005-5-5 14:18:46 | 显示全部楼层
什么问题也没了,风平浪静,郁闷那。唉。。。。。。   
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-10-6 12:58 , Processed in 0.106698 second(s), 15 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表