我正在尝试在具有Ubuntu 14.04的Amazon EC2实例上安装构建必备软件包。它没有普通Ubuntu桌面版本中的一些基本软件包。每次我尝试使用命令sudo apt-get -f install build-essential
安装任何软件包时,我都会遇到相同的依赖性错误。我试图安装我的应用程序所需的perl模块。我可能通过尝试一些命令(如clean)搞砸了包管理器。为什么构建必需品需要perl?我的包存储库是否已损坏。我可以从新鲜或任何其他解决方案开始吗?提前谢谢。
错误
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
build-essential : Depends: libc6-dev but it is not going to be installed or
libc-dev
Depends: gcc (>= 4:4.4.3) but it is not going to be installed
Depends: g++ (>= 4:4.4.3) but it is not going to be installed
Depends: make but it is not going to be installed
Depends: dpkg-dev (>= 1.13.5) but it is not going to be installed
libapparmor-perl : Depends: perl-base (>= 5.18.2-2ubuntu1) but 5.14.2-21build1 is to be installed
Depends: perlapi-5.18.2
libdbd-mysql-perl : Depends: perlapi-5.18.1
libdbi-perl : Depends: perlapi-5.18.1
liblocale-gettext-perl : PreDepends: perl-base (>= 5.18.1-4) but 5.14.2-21build1 is to be installed
PreDepends: perlapi-5.18.1
liblwp-protocol-https-perl : Depends: libio-socket-ssl-perl (>= 1.54) but 1.31-1 is to be installed
Depends: libnet-http-perl but it is not going to be installed
Depends: libwww-perl (>= 6.05-2) but it is not going to be installed
libsub-name-perl : Depends: perlapi-5.18.1
libterm-readkey-perl : Depends: perlapi-5.18.1
libtext-charwidth-perl : Depends: perl-base (>= 5.18.1-4) but 5.14.2-21build1 is to be installed
Depends: perlapi-5.18.1
libtext-iconv-perl : Depends: perl-base (>= 5.18.1-4) but 5.14.2-21build1 is to be installed
Depends: perlapi-5.18.1
libtext-soundex-perl : Depends: perlapi-5.18.1
perl : Depends: perl-base (= 5.18.2-2ubuntu1) but 5.14.2-21build1 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
答案 0 :(得分:2)
执行
sudo apt-get update
在安装之前,它应该会有所帮助。