Parcourir la source

Fix npm permission error cause by sudo

Hugo il y a 6 ans
Parent
commit
c456d396d2
1 fichiers modifiés avec 4 ajouts et 2 suppressions
  1. 4 2
      fourier_install.sh

+ 4 - 2
fourier_install.sh

@@ -79,11 +79,15 @@ sudo apt-get install -y gfortran libopenblas-dev liblapack-dev
 sudo apt-get install -y python-matplotlib
 sudo apt-get install -y curl
 sudo apt-get install -y libshout3 libshout3-dev
+
 sudo npm install -g http-server
+sudo npm install -g pm2
+
 cd tools
 sudo python ./setup.py install
 cd ..
 
+sudo chown -R 1000:1000 ~/.npm
 sudo chmod 0600 $installerpath/repokey
 
 cd $installerpath
@@ -122,8 +126,6 @@ sudo cp ./src/rtl_fm /usr/bin/rtl_fm
 #sudo make install
 echo "SUBSYSTEMS=="usb", ATTRS{idVendor}=="0bda", ATTRS{idProduct}=="2838", MODE:="0666"" | sudo tee -a /etc/udev/rules.d/rtl-sdr.rules
 
-sudo npm install -g pm2
-
 [ ! -f "$configfile" ] && \
 	sudo python $installerpath/configure.py \
 		   		$installerpath/fourier-config.json \