I Tried to install nodejs using nvm on ubuntu 18.04. But everytime it's throwing following error stack
pasindu#pasindu-HP-EliteBook-850-G7-Notebook-PC:~$ nvm install 0.10.35
Downloading and installing node v0.10.35...
Downloading https://nodejs.org/dist/v0.10.35/node-v0.10.35-linux-x64.tar.gz...
Warning: Failed to create the file
Warning: /home/pasindu/.nvm/.cache/bin/node-v0.10.35-linux-x64/node-v0.10.35-li
Warning: nux-x64.tar.gz: Permission denied
curl: (23) Failure writing output to destination
Binary download from https://nodejs.org/dist/v0.10.35/node-v0.10.35-linux-x64.tar.gz failed, trying source.
grep: /home/pasindu/.nvm/.cache/bin/node-v0.10.35-linux-x64/node-v0.10.35-linux-x64.tar.gz: No such file or directory
Provided file to checksum does not exist.
Binary download failed, trying source.
Detected that you have 12 CPU core(s)
Running with 11 threads to speed up the build
Downloading https://nodejs.org/dist/v0.10.35/node-v0.10.35.tar.gz...
Warning: Failed to create the file
Warning: /home/pasindu/.nvm/.cache/src/node-v0.10.35/node-v0.10.35.tar.gz:
Warning: Permission denied
curl: (23) Failure writing output to destination
Binary download from https://nodejs.org/dist/v0.10.35/node-v0.10.35.tar.gz failed, trying source.
grep: /home/pasindu/.nvm/.cache/src/node-v0.10.35/node-v0.10.35.tar.gz: No such file or directory
Provided file to checksum does not exist.
It may be the problem of snap curl, see here, cos I installed curl with snap at first and always encounter this problem, then I removed curl with sudo snap remove curl and reinstall it with sudo apt install curl, my current curl version is 7.68.0. then solved it.
I had to clear the cache:
nvm cache clear.
I've got the error after I tried to install a version of Node, which I've tried to install already, however the installation processs failed at the first time due disconnecting from the internet.
Related
ERROR: Could not install packages due to an EnvironmentError: Failed to parse:
I am using below command for installation
python3.7 -m pip install --user xxx-scanner
I tried this command on ubuntu vm.This command works in my vm but fails from travis setup
ubuntu dist: xenial
As mentioned in the link provided by #ambikanair if you get an error like:
ERROR: Could not install packages due to an EnvironmentError: Failed to parse:
you likely need to escape characters like # or % in the URL in your pip configuration file (e.g. ~/.pip/pip.conf), so instead of:
user#domain.com
do:
user%40domain.com
This is a requirement since pip 19.2, caused by urrlib3 library introducing changes to URL parsing (see issue on GitHub).
I found the reason for the issue
https://github.com/pypa/pip/issues/6775
Hi I am trying to install nodejs in ubuntu 14 but getting following error.
E: Cannot get debconf version. Is debconf installed?
debconf: apt-extracttemplates failed: No such file or directory
Extracting templates from packages: 62%E: Cannot get debconf version. Is debconf installed?
debconf: apt-extracttemplates failed: No such file or directory
Extracting templates from packages: 100%
dpkg: cannot scan updates directory `/var/lib/dpkg/updates/': No such file or directory
E: Sub-process /usr/bin/dpkg returned an error code (2)
when trying to installing with software updated I am getting following error.
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/aptdaemon/worker.py", line 300, in _process_transaction
not self.is_dpkg_journal_clean()):
File "/usr/lib/python3/dist-packages/aptdaemon/worker.py", line 1111, in is_dpkg_journal_clean
for dentry in os.listdir(status_updates):
FileNotFoundError: [Errno 2] No such file or directory: '/var/lib/dpkg/updates/'
I had this problem previously, I removed any variables equivalent to zero and it solved it, perhaps try that.
Add the Node.js-maintained repositories to your Ubuntu package source list with this command:
curl -sL https://deb.nodesource.com/setup | sudo bash -
Then install Node.js with apt-get:
sudo apt-get install nodejs
Optionally we can create a symbolic link for node (for reasons mentioned earlier):
sudo ln -s /usr/bin/nodejs /usr/bin/node
Using this install option, we end up with newer versions of Node.js and npm:
$ node -v
$ npm -v
to check node version and npm version
I suggest installing nvm (node version manager)
https://github.com/creationix/nvm
it allows you to install and use ANY node version, and this may be way better, because ubuntu is bound to one specific version. In web development, every project is prepared using dofferen node, so switching it might be necessary
This is the output i am getting while running command nvm install 4.6.0 in my ubuntu 16.04.
############################################################### 88.0%
curl: (56) GnuTLS recv error (-54): Error in the pull function.
Binary download from https://nodejs.org/dist/v4.6.0/node-v4.6.0-linux-x64.tar.xz failed, trying source.
grep: /home/swap/.nvm/.cache/bin/node-v4.6.0-linux-x64/node-v4.6.0-linux-x64.tar.xz: No such file or directory
Provided file to checksum does not exist.
Binary download failed, trying source.
####
I also experienced this issue and i believe it must be an issue with some GNU or curl
The way i was able to install nodejs was using node version manager
Step1
Run either:
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.5/install.sh | bash
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.5/install.sh | bash
Use either wget or curl
step2
close current terminal and open another
nvm ls //should show if you have nodejs previous versions if none itll indicate
Step3:
Install latest version of nodejs by today its version 8
nvm install v8.6.0
check the latest version and replace the numbers
Now nodejs should be installed
node -v
npm -v
I've installed nodebrew with my homebrew and attempted to install the stable version of node. I'm using Mac OSX El Capitan version 10.11.1.
$ nodebrew install-binary stable
However, I'm getting the following error:
fetch: http://nodejs.org/dist/v5.1.1/node-v5.1.1-darwin-x64.tar.gz
Warning: Failed to create the file
Warning: /usr/local/Cellar/nodebrew/0.9.2/bin/nodebrew/src/v5.1.1/node- v5.1.1-d
Warning: arwin-x64.tar.gz: Not a directory
curl: (23) Failed writing body (0 != 987)
download faild: http://nodejs.org/dist/v5.1.1/node-v5.1.1-darwin-x64.tar.gz
I've tried searching for info about the same problem but no luck.
How can I fix it?
It is the permissions problem. so failed to create directory.
mkdir -p ~/.nodebrew/src
When running:
nvm install iojs-v2
I get the following error:
######################################################################## 100.0%
curl: (7) Failed to connect to localhost port 80: Connection refused
grep: /Volumes/Macintosh HD/Users/ev_blurbs/.nvm/bin/iojs-v2.5.0-darwin-x64/iojs-v2.5.0-darwin-x64.tar.gz: No such file or directory
Binary download failed, trying source.
Installing iojs from source is not currently supported
I'm not sure why the curl command is failing. Any help would be much appreciated. Thanks!
UPDATE:
I commented out all the localhost records in my /etc/host file. Now running nvm install iojs-v2 returns:
######################################################################## 100.0%
curl: (47) Maximum (50) redirects followed
grep: /Volumes/Macintosh HD/Users/ev_blurbs/.nvm/bin/iojs-v2.5.0-darwin-x64/iojs-v2.5.0-darwin-x64.tar.gz: No such file or directory
Binary download failed, trying source.
Installing iojs from source is not currently supported
UPDATE 2:
I'm using OSX 10.10.5. IOJS is trying to use Darwin. I believe that's correct, but wanted to list this.
(nvm maintainer here)
Specifically, curl: (7) Failed to connect to localhost port 80: Connection refused is the reason it's failing. Have you perhaps set a custom curl proxy?
Please try updating to the latest version of nvm; if it still doesn't work, please file an issue on the project repo and fill out the issue template.