2
votes

I am trying to install build essential packages on Amazon EC2 instance having Ubuntu 14.04. It doesn't have some essential packages which comes in normal Ubuntu desktop edition.Every time I try to install any package with command sudo apt-get -f install build-essential, I am getting same dependency error. I was trying to install perl modules required for my application. I might have messed up with package manager by trying some commands such as clean. Why build essentials requires perl? Is my package repository corrupted. Can I start from fresh or any other solution? Thanks in advance.

Error

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).
1

1 Answers

2
votes

Execute

sudo apt-get update

before install, it should help.