Я пытаюсь установить пакет build-essential на Ubuntu 16.04 (Xenial Xerus), но есть проблема с зависимостями.
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.
и когда я пытался,
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.
и также;
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
Турецкие repo имеют некоторые проблемы. Можно изменить/etc/apt/sources.list файл.
замена все строки http://tr.archive.ubuntu.com/ubuntu к http://archive.ubuntu.com/ubuntu
и выполняется, sudo Кв. - получают обновление; склонные sudo - получают обновление
libc6-dev: Зависит: libc6 (= 2.23-0ubuntu2), но 2.23-0ubuntu3 должен быть установлен
, libc6 и libc6-dev должны быть той же версией, но версия libc6-dev, найденного на склонных зеркалах, настраивается для использования, является более старым, чем версия libc6 в системе и способной привычке обычно понижает пакеты.
В этом случае похоже, что Вашей проблемой является плохо устаревшее зеркало (2.23-0ubuntu3, был в гостеприимном больше недели теперь). Я предложил бы изменить Ваш sources.list для указания на другое зеркало.
можно также столкнуться с этой проблемой, когда кто-то изменяет sources.list на более новый выпуск, устанавливает некоторый материал и возвращает ее, но в этом случае Вы обычно видели бы различие в увеличенной версии.