2

I'm having trouble downloading the dependencies in RPI Zero Wireless using sudo apt-get install npm. It failed to fetch the package. I get

Err http://mirror.sysu.edu.cn/raspbian/raspbian/ jessie/main gyp all 0.1~svn1729-3
  Could not connect to mirror.sysu.edu.cn:80 (202.116.65.189), connection timed out
Err http://mirror.sysu.edu.cn/raspbian/raspbian/ jessie/main libjs-node-uuid all 1.4.0-1
  Unable to connect to mirror.sysu.edu.cn:http:

Any idea?

1

It looks like that mirror is currently down (that's the Raspbian repository mirror from China's Sun Yat-sen University). It might be wise to choose a different mirror from the list and put it in your /etc/apt/sources.list. The format is as follows (taken from the linked Debian documentation):

The entries in this file normally follow this format (the entries below are fictitious and should not be used):

deb http://site.example.com/debian distribution component1 component2 component3
deb-src http://site.example.com/debian distribution component1 component2 component3

Archive type
The first word on each line, deb or deb-src, indicates the type of archive. Deb indicates that the archive contains binary packages (deb), the pre-compiled packages that we normally use. Deb-src indicates source packages, which are the original program sources plus the Debian control file (.dsc) and the diff.gz containing the changes needed for packaging the program.

However, it would probably be wiser to install Node and npm from the official source rather than using Raspbian's repository in this case. The Debian package of Node is typically several releases out of date, and you should instead follow the instructions given on the Node.js website, which will install a more recent version of Node.js and npm in the same package.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.