0

I'm not being able to install NPM on my Debian embedded hardaware. Here is the log:

I'm trying to install node on an embedded amd64 system. Here is the log:

$ 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

I've tryed to purge old packages, to autoremove packages, but nothing makes it work....

[EDIT] As asked, my sources.list file:

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
3
  • Did you try to correct your sources.list ? "Failed to fetch debian.moxa.com/debian/dists/jessie/InRelease" Jun 20, 2018 at 8:01
  • Can you please elaborate ? No idea how to fix it. MOXA is the embedded hardaware that runs a Debian distro... Show I remove the entry (I'm adding the sources.list file in the post)
    – Mendes
    Jun 20, 2018 at 8:20
  • I can elaborate: Moxa is missing "contrib/binary-amd64/Packages" for jessie. I would think this is something only Moxa can fix. What "embedded hardaware" are we talking about? Jun 20, 2018 at 8:29

1 Answer 1

1

Change your sources.list, first line

deb http://debian.moxa.com/debian/ jessie main contrib non-free

to

deb http://debian.moxa.com/debian/ jessie main

and retry your setup.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .