Ребят, проблема с установкой npm. пытаюсь установить на VPS под Ubuntu 16.04.2
sudo apt-get install npm
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:
npm : Depends: node-gyp (>= 0.10.9) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
В данном случае, в ответе сказано, что некоторые пакеты не могут быть установлены, и следующие пакеты имеют неудовлетворённые зависимости:
npm : Depends: node-gyp (>= 0.10.9)
Невозможно исправить проблемы, у вас есть сломанные пакеты.
Во множестве гайдов предлагается выполнить ряд команд, который в последствии должны исправить проблему. аналогично данному При выполнении sudo apt-get update в конце выполнения фигурируют следующие строки
Reading package lists... Done
W: The repository 'http://old-releases.ubuntu.com/ubuntu xenial Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: The repository 'http://old-releases.ubuntu.com/ubuntu xenial-updates Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Failed to fetch http://old-releases.ubuntu.com/ubuntu/dists/xenial/main/binary-amd64/Packages 404 Not Found
E: Failed to fetch http://old-releases.ubuntu.com/ubuntu/dists/xenial-updates/main/binary-amd64/Packages 404 Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead.
sudo apt-get dist-upgrade так же не решил проблему.
Получается, что проблема с зависимостями. Мучаюсь уже долгое время. Как я понимаю нужно подредачить один из файлов /etc/apt/sources.list но что именно там нужно заменить не понимаю. помогите пожалуйста с решением.
nodejs -v v0.10.25
Результат команды tail -n 100 /etc/apt/sources.list /etc/apt/sources.list.d/*
==> /etc/apt/sources.list <==
deb http://old-releases.ubuntu.com/ubuntu xenial main restricted universe
deb http://old-releases.ubuntu.com/ubuntu xenial-updates main restricted universe
deb http://security.ubuntu.com/ubuntu xenial-security main restricted universe multiverse
deb http://archive.canonical.com/ubuntu xenial partner
deb http://archive.ubuntu.com/ubuntu trusty main universe
tail: cannot open '/etc/apt/sources.list.d/*' for reading: No such file or directory
$ tail -n 100 /etc/apt/sources.list /etc/apt/sources.list.d/*
archive.ubuntu.com
(и на его зеркалах). приведённая вами ссылка никакого отношения к дистрибутиву ubuntu вообще не имеет. // да, я понимаю, что вы просто некорректно сформулировали мысль.