我正在运行的Ubuntu 10.04。
我只是跑命令,
sudo apt-get install php5-gd
但它给了我这个错误
The following packages have unmet dependencies: php5-gd: Depends: php5-common (= 5.3.2-1ubuntu4) but 5.3.2-1ubuntu4.5 is to be installed E: Broken packages
当尝试在php5-common上安装apt-get,但是它说我已经有了最新的版本。 我如何安装php5-gd?
附加信息以下是我在做一个sudo apt-get update | grep main之后所看到的内容 sudo apt-get update | grep main
Ign http://us.archive.ubuntu.com/ubuntu/ lucid/main Translation-en_US Ign http://dl.google.com/linux/chrome/deb/ stable/main Translation-en_US Ign http://dl.google.com/linux/talkplugin/deb/ stable/main Translation-en_US Hit http://us.archive.ubuntu.com lucid/main Packages Hit http://us.archive.ubuntu.com lucid/main Sources Get:5 http://dl.google.com stable/main Packages [1,093B] Get:6 http://dl.google.com stable/main Packages [737B]
更新软件包索引文件(目前php5-common 5.3.2-1ubuntu4.7):
$ sudo apt-get update $ sudo apt-get install php5-gd
检查/etc/apt/sources.list中的跟随string:
deb http://us.archive.ubuntu.com/ubuntu/ lucid main restricted deb http://us.archive.ubuntu.com/ubuntu/ lucid-updates main restricted deb http://security.ubuntu.com/ubuntu lucid-security main restricted
固定:
$ sudo -s # echo "deb http://us.archive.ubuntu.com/ubuntu/ lucid-updates main restricted" >> /etc/apt/sources.list # echo "deb http://security.ubuntu.com/ubuntu lucid-security main restricted" >> /etc/apt/sources.list # apt-get update # apt-get install php5-gd
你可能只是忘了做sudo apt-get update
如果这不适合你尝试sudo apt-get update && apt-get -f install
如果这不起作用,你可能会搞砸你的东西来源
不推荐使用最后的最大比率是通过类似dpkg -i --force-depends-version方式来强制它,但是你应该试着解决这个问题。
没有更多的信息,我不能帮助你进一步。