2017-08-18 5 views
1

私はnode.js 7をubuntuにインストールしようとしています。コマンドにnode.jsの設定でapt-get権限エラー

curl -sL https://deb.nodesource.com/setup_7.x | bash - 

または

sudo curl -sL https://deb.nodesource.com/setup_7.x | bash - 

を実行する上で、私は次のエラーを取得する:

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


## Populating apt-get cache... 

+ apt-get update 
Reading package lists... Done 
W: chmod 0700 of directory /var/lib/apt/lists/partial failed - SetupAPTPartialDirectory (1: Operation not permitted) 
E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied) 
E: Unable to lock directory /var/lib/apt/lists/ 
W: Problem unlinking the file /var/cache/apt/pkgcache.bin - RemoveCaches (13: Permission denied) 
W: Problem unlinking the file /var/cache/apt/srcpkgcache.bin - RemoveCaches (13: Permission denied) 
Error executing command, exiting 

私も実行しています

apt-get update 

これを再びエラーになりますしかし、私が実行すると、上記のsudo apt-get update エラーはありませんが、再度最初の2つのコマンドを実行するとエラーが再び発生します。

私はautoremovepurgeupgradeにしようとしましたが、それでも問題は解決しません。 すべてのヘルプははるかになりますが、bashのプロセス(あなた)の所有者が書き込み権限を持っていなかったroot.andとしてあなた自身としてはbashを実行している、とカールた

sudo curl -sL https://deb.nodesource.com/setup_7.x | bash - 

を実行することにより

答えて

4

に感謝します/ var/lib/apt/lists/partial。
あなたは使用して試すことができます:

sudo curl -sL https://deb.nodesource.com/setup_7.x | sudo bash - 

あなたはより多くの情報については、このarticleを確認することができます。

関連する問題