Ubuntu: why build-essential failed?



Question:

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.


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.


Solution:3

For me, I re-installed

libdpkg-perl  

and it worked. You can allow synaptic to downgrade this package if you use synaptic


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »