当前时区为 UTC + 8 小时



发表新帖 回复这个主题  [ 4 篇帖子 ] 
作者 内容
1 楼 
 文章标题 : 用apt-get安装任何软件都出错!
帖子发表于 : 2007-11-28 0:31 

注册: 2007-09-06 17:54
帖子: 49
送出感谢: 0 次
接收感谢: 0 次
今天发现在运行apt-get upgrade是出错如下。请教各位该如何解决?根据系统的提示,要用命令:apt-get -f install来解决,但我运行该命令后,系统提示我将会删除一大堆软件,我没敢试,先问一下大家,是应该这样处理吗?

我记得问题是在前几天我装一个deb包后发生的,当时装这个deb包因为缺少其他包的原因没有装成功,提示要求的包虽然系统上有,但版本不对。后来我就没再装,再后来用apt-get的时候就出问题了。

刚才又试了一下,不但upgrade会出下面的错,安装别的软件也会出同样的提示!

junl@szsrv01:~$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree... Done
You might want to run `apt-get -f install' to correct these.
The following packages have unmet dependencies:
libc6-dev: Depends: libc6 (= 2.3.6-0ubuntu20.5) but 2.5-0ubuntu14 is installed
libc6-i686: PreDepends: libc6 (= 2.3.6-0ubuntu20.5) but 2.5-0ubuntu14 is installed
libgcc1: Depends: gcc-4.1-base (= 4.1.2-0ubuntu4) but it is not installable
E: Unmet dependencies. Try using -f.
junl@szsrv01:~$
junl@szsrv01:~$
junl@szsrv01:~$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree... Done
Correcting dependencies... Done
The following packages will be REMOVED:
apache2 apache2-common apache2-mpm-prefork apt apt-utils aptitude build-essential dselect
g++ g++-4.0 gcc gcc-4.0 groff-base libapache2-mod-php5 libc6-dev libc6-i686 libgc1c2
libgcc1 libsigc++-2.0-0c2a libstdc++6 libstdc++6-4.0-dev lshw man-db mysql-client-5.0
mysql-server mysql-server-5.0 nmap php5-mysql php5-mysqli telnet ubuntu-minimal
ubuntu-standard w3m
WARNING: The following essential packages will be removed.
This should NOT be done unless you know exactly what you are doing!
apt libgcc1 (due to apt) libstdc++6 (due to apt)
0 upgraded, 0 newly installed, 33 to remove and 1 not upgraded.
1 not fully installed or removed.
Need to get 0B of archives.
After unpacking 125MB disk space will be freed.
You are about to do something potentially harmful.
To continue type in the phrase 'Yes, do as I say!'
?]


最后由 fatalerr 编辑于 2007-11-28 9:34,总共编辑了 1 次

页首
 用户资料  
 
2 楼 
 文章标题 :
帖子发表于 : 2007-11-28 9:24 

注册: 2007-09-06 17:54
帖子: 49
送出感谢: 0 次
接收感谢: 0 次
搜索了一下,看来遇到类似的问题挺多的,但要么就没任何信息,要么就是只在论坛上留个“已解决”,没一个说出解决方法来的!郁闷!

有人说可能是apt源的问题,我用的是官方的源啊。详细信息如下:

引用:
junl@szsrv01:~$ cat /etc/issue
Ubuntu 6.06.1 LTS \n \l

junl@szsrv01:~$ cat /etc/apt/sources.list
#
# deb cdrom:[Ubuntu-Server 6.06.1 _Dapper Drake_ - Release i386 (20060807.1)]/ dapper main restricted


deb cdrom:[Ubuntu-Server 6.06.1 _Dapper Drake_ - Release i386 (20060807.1)]/ dapper main restricted

deb http://us.archive.ubuntu.com/ubuntu/ dapper main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ dapper main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://us.archive.ubuntu.com/ubuntu/ dapper-updates main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ dapper-updates main restricted

## Uncomment the following two lines to add software from the 'universe'
## repository.
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## universe WILL NOT receive any review or updates from the Ubuntu security
## team.
# deb http://us.archive.ubuntu.com/ubuntu/ dapper universe
# deb-src http://us.archive.ubuntu.com/ubuntu/ dapper universe

## Uncomment the following two lines to add software from the 'backports'
## repository.
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
# deb http://us.archive.ubuntu.com/ubuntu/ dapper-backports main restricted universe multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ dapper-backports main restricted universe multiverse


deb http://security.ubuntu.com/ubuntu dapper-security main restricted
deb-src http://security.ubuntu.com/ubuntu dapper-security main restricted
# deb http://security.ubuntu.com/ubuntu dapper-security universe
# deb-src http://security.ubuntu.com/ubuntu dapper-security universe
junl@szsrv01:~$


页首
 用户资料  
 
3 楼 
 文章标题 : Re: 用apt-get安装任何软件都出错!
帖子发表于 : 2007-11-28 11:05 
头像

注册: 2007-05-30 9:23
帖子: 85
送出感谢: 0 次
接收感谢: 0 次
fatalerr 写道:
今天发现在运行apt-get upgrade是出错如下。请教各位该如何解决?根据系统的提示,要用命令:apt-get -f install来解决,但我运行该命令后,系统提示我将会删除一大堆软件,我没敢试,先问一下大家,是应该这样处理吗?

我记得问题是在前几天我装一个deb包后发生的,当时装这个deb包因为缺少其他包的原因没有装成功,提示要求的包虽然系统上有,但版本不对。后来我就没再装,再后来用apt-get的时候就出问题了。

刚才又试了一下,不但upgrade会出下面的错,安装别的软件也会出同样的提示!

junl@szsrv01:~$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree... Done
You might want to run `apt-get -f install' to correct these.
The following packages have unmet dependencies:
libc6-dev: Depends: libc6 (= 2.3.6-0ubuntu20.5) but 2.5-0ubuntu14 is installed
libc6-i686: PreDepends: libc6 (= 2.3.6-0ubuntu20.5) but 2.5-0ubuntu14 is installed
libgcc1: Depends: gcc-4.1-base (= 4.1.2-0ubuntu4) but it is not installable
E: Unmet dependencies. Try using -f.
junl@szsrv01:~$
junl@szsrv01:~$
junl@szsrv01:~$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree... Done
Correcting dependencies... Done
The following packages will be REMOVED:
apache2 apache2-common apache2-mpm-prefork apt apt-utils aptitude build-essential dselect
g++ g++-4.0 gcc gcc-4.0 groff-base libapache2-mod-php5 libc6-dev libc6-i686 libgc1c2
libgcc1 libsigc++-2.0-0c2a libstdc++6 libstdc++6-4.0-dev lshw man-db mysql-client-5.0
mysql-server mysql-server-5.0 nmap php5-mysql php5-mysqli telnet ubuntu-minimal
ubuntu-standard w3m
WARNING: The following essential packages will be removed.
This should NOT be done unless you know exactly what you are doing!
apt libgcc1 (due to apt) libstdc++6 (due to apt)
0 upgraded, 0 newly installed, 33 to remove and 1 not upgraded.
1 not fully installed or removed.
Need to get 0B of archives.
After unpacking 125MB disk space will be freed.
You are about to do something potentially harmful.
To continue type in the phrase 'Yes, do as I say!'
?]

一个字,删……

把系统提示的要删除的删除掉


页首
 用户资料  
 
4 楼 
 文章标题 :
帖子发表于 : 2007-12-11 14:42 

注册: 2007-09-06 17:54
帖子: 49
送出感谢: 0 次
接收感谢: 0 次
搞定了。
是因为手动安装了一些库文件,版本不兼容引起的。后来使用了aptitude来将这些库文件降级。降级后恢复正常。


页首
 用户资料  
 
显示帖子 :  排序  
发表新帖 回复这个主题  [ 4 篇帖子 ] 

当前时区为 UTC + 8 小时


在线用户

正在浏览此版面的用户:没有注册用户 和 4 位游客


不能 在这个版面发表主题
不能 在这个版面回复主题
不能 在这个版面编辑帖子
不能 在这个版面删除帖子
不能 在这个版面提交附件

前往 :  
本站点为公益性站点,用于推广开源自由软件,由 DiaHosting VPSBudgetVM VPS 提供服务。
我们认为:软件应可免费取得,软件工具在各种语言环境下皆可使用,且不会有任何功能上的差异;
人们应有定制和修改软件的自由,且方式不受限制,只要他们自认为合适。

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
简体中文语系由 王笑宇 翻译