Próbuję zainstalować pakiet niezbędny do kompilacji na Ubuntu 16.04 (Xenial Xerus), ale występuje problem z zależnością.
root@server:~# 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: libc6-dev but it is not going to be installed or
libc-dev
Depends: gcc (>= 4:5.2) but it is not going to be installed
Depends: g++ (>= 4:5.2) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
a kiedy próbowałem
root@server:~# apt-get install libc6-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:
libc6-dev : Depends: libc6 (= 2.23-0ubuntu2) but 2.23-0ubuntu3 is to be installed
E: Unable to correct problems, you have held broken packages.
i również;
root@server:~# apt-cache policy libc6-dev
libc6-dev:
Installed: (none)
Candidate: 2.23-0ubuntu2
Version table:
2.23-0ubuntu2 500
500 http://tr.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
root@server:~# apt-cache policy gcc
gcc:
Installed: (none)
Candidate: 4:5.3.1-1ubuntu1
Version table:
4:5.3.1-1ubuntu1 500
500 http://tr.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
root@server:~# apt-cache policy g++
g++:
Installed: (none)
Candidate: 4:5.3.1-1ubuntu1
Version table:
4:5.3.1-1ubuntu1 500
500 http://tr.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
build-essential
pierwszy, teraz działa bez problemu.
sudo apt-get update
i spróbuj ponownie. Jeśli to spowoduje błąd i problem będzie się powtarzał, zgłoś się.