why build-essential failed?

29,574

Solution 1

Run sudo apt-get install libdpkg-perl=1.17.5ubuntu5 to downgrade libdpkg-perl.

You somehow installed a newer version of the package than what is in the repositories, which is causing problems with other packages.

Solution 2

Try Code:

sudo apt-get update

to update your package list.

Then Code:

sudo apt-get autoclean

to clean up any partial packages.

Then Code:

sudo apt-get clean

to clean up the apt cache.

Then Code:

sudo apt-get autoremove

will clean up any unneeded dependencies.

If while doing this you can identify the broken package this code will very forcefully remove it.

Code:

sudo dpkg --remove -force --force-remove-reinstreq <package name>

Change package name to the real name of course.

Then, go back to your build-essential install

Code:

sudo apt-get install dpkg-dev
sudo apt-get install build-essential

See, if this works for you.

Share:
29,574

Related videos on Youtube

dmgl
Author by

dmgl

Updated on September 18, 2022

Comments

  • dmgl
    dmgl over 1 year

    I cannot found solution for this problem:

    constantia@constantia:~$ sudo apt-get install build-essential
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    Some packages could not be installed. This may mean that you have
    requested an impossible situation or if you are using the unstable
    distribution that some required packages have not yet been created
    or been moved out of Incoming.
    The following information may help to resolve the situation:
    
    The following packages have unmet dependencies:
     build-essential : Depends: dpkg-dev (>= 1.13.5) but it is not going to be installed
    E: Unable to correct problems, you have held broken packages.
    
    constantia@constantia:~$ sudo apt-get install dpkg-dev
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    Some packages could not be installed. This may mean that you have
    requested an impossible situation or if you are using the unstable
    distribution that some required packages have not yet been created
    or been moved out of Incoming.
    The following information may help to resolve the situation:
    
    The following packages have unmet dependencies:
     dpkg-dev : Depends: libdpkg-perl (= 1.17.5ubuntu5) but 1.17.5ubuntu5.2 is to be installed
                Recommends: build-essential but it is not going to be installed
                Recommends: fakeroot but it is not going to be installed
                Recommends: libalgorithm-merge-perl but it is not going to be installed
    E: Unable to correct problems, you have held broken packages.
    
    constantia@constantia:~$ sudo apt-get install -f
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
    

    Sorry, if my questions is so stupid. Maybe somebody explain me from where my problem is? I don't touch the system at all (new installation of 14.04). Thank you.

    • eyoung100
      eyoung100 almost 10 years
      sudo apt-get install -f libdpkg-perl??
    • saiarcot895
      saiarcot895 almost 10 years
      @123456: madison?
    • No Time
      No Time almost 10 years
      It looks like the original program may be dependent on an older version. (Current version of dpkg-dev here) Some of your other programs will depend on newer versions of software to function. Basically the developer of the program should have compatibility, or you can install older packages alongside new ones This is not normally recommended, but it can be done.
  • saiarcot895
    saiarcot895 almost 10 years
    Was there any output?