Vinícius Pires
Vinícius Pires

Reputation: 99

Installing NVM - curl: (23) Failure writing output to destination - Permision denied

I was trying to download the node 18 on Ubuntu 22.04, however, I couldn't do it by apt-get or do so by nvm. I need help, because without node I can't develop my projetcs. I'm from Brazil, so some of the phrases on terminal are in portuguese, I'll translate them.

Terminal message

nvm install 18
Downloading and installing node v18.18.2...
Downloading https://nodejs.org/dist/v18.18.2/node-v18.18.2-linux-x64.tar.xz...
Warning: Failed to open the file                                               
Warning: /home/vinicius_pires/.nvm/.cache/bin/node-v18.18.2-linux-x64/node-v18.
Warning: 18.2-linux-x64.tar.xz: Permission denied
curl: (23) Failure writing output to destination

Binary download from https://nodejs.org/dist/v18.18.2/node-v18.18.2-linux-x64.tar.xz failed, trying source.
grep: /home/vinicius_pires/.nvm/.cache/bin/node-v18.18.2-linux-x64/node-v18.18.2-linux-x64.tar.xz: Arquivo ou diretório inexistente
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/v18.18.2/node-v18.18.2.tar.xz...
Warning: Failed to open the file 
Warning: /home/vinicius_pires/.nvm/.cache/src/node-v18.18.2/node-v18.18.2.tar.x
Warning: z: Permission denied
                                                                            0.0%curl: (23) Failure writing output to destination

Binary download from https://nodejs.org/dist/v18.18.2/node-v18.18.2.tar.xz failed, trying source.
grep: /home/vinicius_pires/.nvm/.cache/src/node-v18.18.2/node-v18.18.2.tar.xz: *Arquivo ou diretório inexistente* (Nonexistent file or directory)
Provided file to checksum does not exist.

Used command nvm install 18 trying download node, but that message was shown on terminal when I did.

Tried to solve with this command sudo rm /var/lib/apt/lists/* ; sudo rm /var/lib/apt/lists/partial/* ; sudo apt-get clean ; sudo apt-get -f install ; sudo apt-get update but didn't work.

Upvotes: 0

Views: 4461

Answers (1)

Vinícius Pires
Vinícius Pires

Reputation: 99

I searched for a answer on other foruns, and I found a situation similiar to mine. I installed the curl using sudo snap install curl, when I wasn't able to install anything using apt-get. But I discovered that method was useless, because apparently curl doesn't work properly.

I found my answers here: curl: (23) Failure writing output to destination.

Basically the way to solved it is to remove the curl and reinstalled by using apt-get

sudo snap remove curl
sudo apt-get install curl

With this everything goes back to normal.

Upvotes: 8

Related Questions