首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法在嵌入式Debian硬件上安装npm:

无法在嵌入式Debian硬件上安装npm:
EN

Server Fault用户
提问于 2018-06-20 07:42:16
回答 1查看 170关注 0票数 0

我无法在我的Debian嵌入式硬件上安装NPM。这是日志:

我试图在嵌入式amd64系统上安装节点。这是日志:

代码语言:javascript
复制
$ sudo curl --silent --location https://deb.nodesource.com/setup_9.x | sudo bash -

## Installing the NodeSource Node.js 9.x repo...


## Populating apt-get cache...

+ apt-get update
Hit http://security.debian.org jessie/updates InRelease
Hit https://dl.yarnpkg.com stable InRelease
Ign http://ftp.us.debian.org jessie InRelease
Hit http://ftp.debian.org jessie-backports InRelease
Hit http://ftp.us.debian.org jessie-updates InRelease
Hit http://security.debian.org jessie/updates/non-free Sources
Hit http://ftp.us.debian.org jessie Release.gpg
Hit http://security.debian.org jessie/updates/non-free amd64 Packages
Hit http://debian.moxa.com jessie InRelease
Hit http://ftp.us.debian.org jessie Release
Hit http://security.debian.org jessie/updates/non-free Translation-en
Hit http://security.debian.org jessie/updates/main Sources
Hit http://security.debian.org jessie/updates/contrib Sources
Hit http://security.debian.org jessie/updates/main amd64 Packages
Get:1 https://dl.yarnpkg.com stable/main Translation-en_US
Hit http://security.debian.org jessie/updates/contrib amd64 Packages
Get:2 https://dl.yarnpkg.com stable/main Translation-en
Hit http://security.debian.org jessie/updates/contrib Translation-en
Get:3 https://dl.yarnpkg.com stable/main Translation-en_US
Hit http://security.debian.org jessie/updates/main Translation-en
Get:4 https://dl.yarnpkg.com stable/main Translation-en
Get:5 https://dl.yarnpkg.com stable/main Translation-en_US
Get:6 https://dl.yarnpkg.com stable/main Translation-en
Get:7 https://dl.yarnpkg.com stable/main Translation-en_US
Get:8 https://dl.yarnpkg.com stable/main Translation-en
Get:9 https://dl.yarnpkg.com stable/main Translation-en_US
Ign https://dl.yarnpkg.com stable/main Translation-en_US
Get:10 https://dl.yarnpkg.com stable/main Translation-en
Ign https://dl.yarnpkg.com stable/main Translation-en
Get:11 http://ftp.debian.org jessie-backports/main Sources/DiffIndex [27.8 kB]
Get:12 http://ftp.us.debian.org jessie-updates/main Sources [17.2 kB]
Get:13 http://ftp.us.debian.org jessie-updates/contrib Sources [32 B]
Get:14 http://ftp.debian.org jessie-backports/contrib Sources/DiffIndex [27.8 kB]
Get:15 http://ftp.us.debian.org jessie-updates/non-free Sources [920 B]
Hit http://debian.moxa.com jessie/main amd64 Packages
Get:16 http://ftp.us.debian.org jessie-updates/main amd64 Packages/DiffIndex [11.8 kB]
Get:17 http://ftp.us.debian.org jessie-updates/contrib amd64 Packages [32 B]
Get:18 http://ftp.debian.org jessie-backports/non-free Sources/DiffIndex [26.0 kB]
Get:19 http://ftp.us.debian.org jessie-updates/non-free amd64 Packages/DiffIndex [736 B]
Get:20 http://ftp.us.debian.org jessie-updates/contrib Translation-en [14 B]
Get:21 http://ftp.debian.org jessie-backports/main amd64 Packages/DiffIndex [27.8 kB]
Get:22 http://ftp.us.debian.org jessie-updates/main Translation-en/DiffIndex [3,688 B]
Get:23 http://ftp.us.debian.org jessie-updates/non-free Translation-en/DiffIndex [736 B]
Get:24 http://ftp.debian.org jessie-backports/contrib amd64 Packages/DiffIndex [26.4 kB]
Get:25 http://ftp.debian.org jessie-backports/non-free amd64 Packages/DiffIndex [24.8 kB]
Get:26 http://ftp.debian.org jessie-backports/contrib Translation-en/DiffIndex [7,960 B]
Get:27 http://ftp.us.debian.org jessie/main Sources [7,054 kB]
Get:28 http://ftp.debian.org jessie-backports/main Translation-en/DiffIndex [27.8 kB]
Get:29 http://ftp.us.debian.org jessie/contrib Sources [50.4 kB]
Get:30 http://ftp.us.debian.org jessie/non-free Sources [99.5 kB]
Get:31 http://ftp.debian.org jessie-backports/non-free Translation-en/DiffIndex [19.1 kB]
Get:32 http://ftp.us.debian.org jessie/main amd64 Packages [6,789 kB]
Get:33 http://ftp.us.debian.org jessie/contrib amd64 Packages [49.8 kB]
Get:34 http://ftp.us.debian.org jessie/non-free amd64 Packages [83.6 kB]
Get:35 http://ftp.us.debian.org jessie/contrib Translation-en [38.3 kB]
Get:36 http://ftp.us.debian.org jessie/main Translation-en [4,583 kB]
Get:37 http://ftp.us.debian.org jessie/non-free Translation-en [72.1 kB]
Fetched 257 kB in 17s (14.9 kB/s)
W: Failed to fetch http://debian.moxa.com/debian/dists/jessie/InRelease  Unable to find expected entry 'contrib/binary-amd64/Packages' in Release file (Wrong sources.list entry or malformed file)

E: Some index files failed to download. They have been ignored, or old ones used instead.
Error executing command, exiting

admin@LABEMBEDDED:~/temp$ npm -v
-bash: npm: command not found


admin@LABEMBEDDED:~/temp$ 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.

sudo: snap: command not found
admin@LABEMBEDDED:~/temp$ sudo apt-get install -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 136 not upgraded.


admin@LABEMBEDDED:~/temp$ 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.

admin@LABEMBEDDED:~/temp$ sudo apitude install npm
sudo: apitude: command not found

admin@LABEMBEDDED:~/temp$ sudo aptitude install npm
The following NEW packages will be installed:
  gyp{a} javascript-common{a} libc-ares-dev{a} libc-ares2{a}
  libjs-jquery{a} libjs-node-uuid{a} libjs-underscore{a}
  libpython-stdlib{a} libssl-dev{ab} libssl-doc{a} libv8-3.14-dev{a}
  libv8-3.14.5{a} node-abbrev{a} node-ansi{a} node-ansi-color-table{a}
  node-archy{a} node-async{a} node-block-stream{a} node-combined-stream{a}
  node-cookie-jar{a} node-delayed-stream{a} node-forever-agent{a}
  node-form-data{a} node-fstream{a} node-fstream-ignore{a}
  node-github-url-from-git{a} node-glob{a} node-graceful-fs{a} node-gyp{a}
  node-inherits{a} node-ini{a} node-json-stringify-safe{a} node-lockfile{a}
  node-lru-cache{a} node-mime{a} node-minimatch{a} node-mkdirp{a}
  node-mute-stream{a} node-node-uuid{a} node-nopt{a}
  node-normalize-package-data{a} node-npmlog{a} node-once{a} node-osenv{a}
  node-qs{a} node-read{a} node-read-package-json{a} node-request{a}
  node-retry{a} node-rimraf{a} node-semver{a} node-sha{a} node-sigmund{a}
  node-slide{a} node-tar{a} node-tunnel-agent{a} node-underscore{a}
  node-which{a} nodejs-dev{ab} npm python{a} python-pkg-resources{a}
  python2.7{a} zlib1g-dev{a}
0 packages upgraded, 64 newly installed, 0 to remove and 136 not upgraded.
Need to get 0 B/6,176 kB of archives. After unpacking 22.5 MB will be used.
The following packages have unmet dependencies:
 libssl-dev : Depends: libssl1.0.0 (= 1.0.1t-1+deb8u8) but 1.0.2l-1~bpo8+1 is installed.
 nodejs-dev : Depends: nodejs (= 0.10.29~dfsg-2) but 4.8.2~dfsg-1~bpo8+1 is installed.
The following actions will resolve these dependencies:

     Keep the following packages at their current version:
1)     libssl-dev [Not Installed]
2)     node-gyp [Not Installed]
3)     nodejs-dev [Not Installed]
4)     npm [Not Installed]



Accept this solution? [Y/n/q/?] Y
The following NEW packages will be installed:
  libpython-stdlib{a} python{a} python2.7{a}
0 packages upgraded, 3 newly installed, 0 to remove and 136 not upgraded.
Need to get 0 B/422 kB of archives. After unpacking 1,120 kB will be used.
Do you want to continue? [Y/n/?] Y
Selecting previously unselected package python2.7.
(Reading database ... 46404 files and directories currently installed.)
Preparing to unpack .../python2.7_2.7.9-2+deb8u1_amd64.deb ...
Unpacking python2.7 (2.7.9-2+deb8u1) ...
Selecting previously unselected package libpython-stdlib:amd64.
Preparing to unpack .../libpython-stdlib_2.7.9-1_amd64.deb ...
Unpacking libpython-stdlib:amd64 (2.7.9-1) ...
Selecting previously unselected package python.
Preparing to unpack .../python_2.7.9-1_amd64.deb ...
Unpacking python (2.7.9-1) ...
Processing triggers for man-db (2.7.0.2-5) ...
Processing triggers for mime-support (3.58) ...
Setting up python2.7 (2.7.9-2+deb8u1) ...
Setting up libpython-stdlib:amd64 (2.7.9-1) ...
Setting up python (2.7.9-1) ...

admin@LABEMBEDDED:~/temp$ npm -v
-bash: npm: command not found

我试过清除旧的包,自动删除包,但是没有什么能使它工作.

如前所述,我的sources.list文件:

代码语言:javascript
复制
deb http://debian.moxa.com/debian/ jessie main contrib non-free

deb http://ftp.us.debian.org/debian/ jessie main contrib non-free
deb-src http://ftp.us.debian.org/debian/ jessie main contrib non-free

deb http://ftp.us.debian.org/debian/ jessie-updates main contrib non-free
deb-src http://ftp.us.debian.org/debian/ jessie-updates main contrib non-free

deb http://security.debian.org/ jessie/updates main contrib non-free
deb-src http://security.debian.org/ jessie/updates main contrib non-free

deb http://ftp.debian.org/debian jessie-backports main contrib non-free
deb-src http://ftp.debian.org/debian jessie-backports main contrib non-free
EN

回答 1

Server Fault用户

回答已采纳

发布于 2018-06-20 08:31:58

更改sources.list,第一行

代码语言:javascript
复制
deb http://debian.moxa.com/debian/ jessie main contrib non-free

代码语言:javascript
复制
deb http://debian.moxa.com/debian/ jessie main

再试一次你的设置。

票数 1
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/917426

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档