分页: 1 / 1
[问题]安装build-essential的问题
发表于 : 2006-06-16 19:50
由 yanxizhen
想在机子装 build-essential这个东东,
sudo apt-get install build-essential却提示
下列的软件包有不能满足的依赖关系:
build-essential: 依赖: gcc (>= 4:4.0) 但是它将不会被安装
依赖: g++ (>= 4:4.0) 但是它将不会被安装
E: 无法安装的软件包
系统是ubuntu 6。06。
发表于 : 2006-06-17 8:10
由 karron
先执行
sudo apt-get update
sudo apt-get dist-upgrade
试试。我还没有遇到过这个问题。
发表于 : 2006-06-17 8:27
由 yanxizhen
试过,不行啊
55~~~~~~~~~~~
发表于 : 2006-06-17 8:57
由 oneleaf
检查一下源,应该是源的设置有问题吧?
发表于 : 2006-06-17 9:27
由 yanxizhen
oneleaf 写了:检查一下源,应该是源的设置有问题吧?
源是用网站上推荐的cn99的源:
代码: 全选
deb http://ubuntu.cn99.com/ubuntu/ dapper main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ dapper-updates main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ dapper-security main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ dapper-backports main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu-cn/ dapper main restricted universe multiverse
发表于 : 2006-06-17 13:14
由 yanxizhen
发表于 : 2006-06-17 13:30
由 yanxizhen
Hi ubuntu forum - thanks for being my rubber duckling. I found the solution myself. As it might be of use in another equal but different situation, ill post it here.
I am not sure of the cause of my problem but i had some new 4.0.2-5 versions of gcc-4.0-base installed. All standar apt-get tricks for resolving broken packages did not work, because i did not have broken packages installed, Apt just dit not want to install g++-4.0 due to dependency problems with gcc-4.0 and gcc-4.0-base.
Appearently i installed a newer version of gcc (and possibly other packages) using a faulty (i.e. non standard ubuntu) apt-source.
I got very scared when, in an attempt to downgrade gcc-4.0-base to gcc-4.0-base=4.0.1-4ubuntu9 apt showed my a huge list of packages to uninstall including apt itself. That was where i stopped and posted the message above..
The solution
The solution was to carefully downgrade a collection of dependent packages (so not only gcc-4.0-base). Appearently apt is clever but not clever enough to understand that if i say
Code:
apt-get install gcc-4.0-base=4.0.1-4ubuntu9
it guesses that all dependent packages should download to the same kind of version level.
So i typed:
Code:
apt-get install gcc-4.0-base=4.0.1-4ubuntu9 gcc-4.0=4.0.1-4ubuntu9 libstdc++6-4.0-dev=4.0.1-4ubuntu9 cpp-4.0=4.0.1-4ubuntu9 libstdc++6=4.0.1-4ubuntu9
now i got a shorter list of packages (not including apt) to remove.
Then i tried pasting all the packages in the remove list in the apt-get install command line. This is where i found the troublemaker. The cpp and gcc showed dependency problems. And an apt-cache show of both packages showed that two versions where available. Step by step i changed the (huge) apt-get install commandline to explicitly include the older (corrent breezy-) versions of packages that had dependency problems and after some time it just worked.
the troublemakers (in my case) where:
cpp downgraded to 4:4.0.1-3
gcc downgraded to 4:4.0.1-3
libgcj6 downgraded to 4.0.1-4ubuntu9
gij-4.0 downgraded to 4.0.1-4ubuntu9
I still don't know where i got the wrong cpp and gcc versions from. (and i still don't know if i have posted this on the right list).
Cheers
Rob
发表于 : 2006-06-17 13:31
由 yanxizhen
找到解决方法了,哈哈,可能是我用apt升级的时候用了非官方的源............