Установка npm/nodejson человечность

sudo apt-get install npm

затем я получаю это:

The following packages have unmet dependencies:

     npm : Depends: nodejs but it is not going to be installed
           Depends: node-abbrev (>= 1.0.4) but it is not going to be installed
           Depends: node-ansi but it is not going to be installed
           Depends: node-archy but it is not going to be installed

даже жесткий nodejs существует в системе, я должен установить отдельно каждую зависимость, как я могу установить их в одном наборе?

также я попробовал это:

sudo apt-get install nodejs-dev

и я получаю это:

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:
 nodejs-dev : Depends: nodejs (= 0.10.25~dfsg2-2ubuntu1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

почему это say's, что nodejs не существует, если это находится в системе, уже установленной?, если его поврежденный, как я мог зафиксировать его? Я попытался удалить его и установка снова, но не сделал помог, какие-либо идеи?

Править

npm:
  Installed: (none)
  Candidate: 1.3.10~dfsg-1
  Version table:
     1.3.10~dfsg-1 0
        500 http://kg.archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages
        100 /var/lib/dpkg/status
nodejs:
  Installed: 4.2.1-2nodesource1~trusty1
  Candidate: 4.2.1-2nodesource1~trusty1
  Version table:
 *** 4.2.1-2nodesource1~trusty1 0
        500 https://deb.nodesource.com/node_4.x/ trusty/main amd64 Packages
        100 /var/lib/dpkg/status
     0.10.25~dfsg2-2ubuntu1 0
        500 http://kg.archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages
node-abbrev:
  Installed: 1.0.4-2
  Candidate: 1.0.4-2
  Version table:
 *** 1.0.4-2 0
        500 http://kg.archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages
        100 /var/lib/dpkg/status
node-ansi:
  Installed: 0.2.1-1
  Candidate: 0.2.1-1
  Version table:
 *** 0.2.1-1 0
        500 http://kg.archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages
        100 /var/lib/dpkg/status
node-archy:
  Installed: 0.0.2-1
  Candidate: 0.0.2-1
  Version table:
 *** 0.0.2-1 0
        500 http://kg.archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages
        100 /var/lib/dpkg/status
2
задан 21 October 2015 в 10:34

1 ответ

Сначала мы пытаемся вызвать установку необходимых пакетов

sudo apt-get install node-abbrev node-ansi node-archy 
sudo apt-get install --reinstall nodejs

, И после apt-cache policy npm nodejs node-abbrev node-ansi node-archy у Вас есть это

npm:
  Installed: (none)
  Candidate: 1.3.10~dfsg-1
  Version table:
     1.3.10~dfsg-1 0
        500 http://kg.archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages
        100 /var/lib/dpkg/status
nodejs:
  Installed: 4.2.1-2nodesource1~trusty1
  Candidate: 4.2.1-2nodesource1~trusty1
  Version table:
 *** 4.2.1-2nodesource1~trusty1 0
        500 https://deb.nodesource.com/node_4.x/ trusty/main amd64 Packages
        100 /var/lib/dpkg/status
     0.10.25~dfsg2-2ubuntu1 0
        500 http://kg.archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages
node-abbrev:
  Installed: 1.0.4-2
  Candidate: 1.0.4-2
  Version table:
 *** 1.0.4-2 0
        500 http://kg.archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages
        100 /var/lib/dpkg/status
node-ansi:
  Installed: 0.2.1-1
  Candidate: 0.2.1-1
  Version table:
 *** 0.2.1-1 0
        500 http://kg.archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages
        100 /var/lib/dpkg/status
node-archy:
  Installed: 0.0.2-1
  Candidate: 0.0.2-1
  Version table:
 *** 0.0.2-1 0
        500 http://kg.archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages
        100 /var/lib/dpkg/status

И так как я не получаю дальнейшей обратной связи от Вас

sudo rm /etc/apt/sources.list.d/nodesource.list
sudo apt-get update
sudo apt-get install nodejs=0.10.25~dfsg2-2ubuntu1
sudo apt-get install -f
sudo apt-get install npm
0
ответ дан 2 December 2019 в 23:52

Другие вопросы по тегам:

Похожие вопросы: