Transferred from: http://allog.ml/linux/aptitude%E8%A7%A3%E5%86%B3ubuntu%E5%90%84%E7%A7%8D%E4%BE%9D%E8%B5%96%E9%97%AE%E9%A2%98/
Complete
Analyzing Dependency tree for Package
Reading status information ... Complete
Some software packages cannot be installed. If you are using the unstable release, this may be
Because the system is unable to achieve the state you requested. There may be some software that you need in this release
The packages have not been created or they have been removed from the new to (Incoming) directory.
The following information may be helpful in resolving a problem:
The following packages have unsatisfied dependencies:
GCC: Dependent: gcc-4.8 (>= 4.8.1-4~) but it will not be installed
E: The error cannot be corrected because you require certain packages to remain current, that is, they destroy the dependencies between the software packages.
Or:
sudo apt-get install build-essential
Reading Package List ... Complete
Analyzing Dependency tree for Package
Reading status information ... Complete
Some software packages cannot be installed. If you are using the unstable release, this may be
Because the system is unable to achieve the state you requested. There may be some software that you need in this release
The packages have not been created or they have been removed from the new to (Incoming) directory.
The following information may be helpful in resolving a problem:
The following packages have unsatisfied dependencies:
Build-essential: Dependent: gcc (>= 4:4.4.3) but it will not be installed
Dependent: g++ (>= 4:4.4.3) but it will not be installed
E: The error cannot be corrected because you require certain packages to remain current, that is, they destroy the dependencies between the software packages.
A similar dependency can be resolved with the aptitude command, Aptitude was originally Debian's default software, but the last few versions of Ubuntu seem to have no such tool. Then install one yourself.
Regardless of 3,721, update first:
sudo apt-get update && sudo apt-get dist-upgrade
Then install today's protagonist:
sudo apt-get install aptitude
Then use aptitude instead of Apt-get to install the software.
sudo aptitude install build-essential
Aptitude to solve various Ubuntu dependency problems