eddelbuettel / mkl4deb

Adding the Intel MKL to a Debian / Ubuntu system via one simple script
212 stars 37 forks source link

when using "sudo", the linux script does not work #4

Closed emilBeBri closed 5 years ago

emilBeBri commented 5 years ago

in linux, when you when you get to these commands:

echo "/opt/intel/lib/intel64"     >  /etc/ld.so.conf.d/mkl.conf
echo "/opt/intel/mkl/lib/intel64" >> /etc/ld.so.conf.d/mkl.conf
ldconfig

you'll get a permission error, if you use "sudo" in order to obtain root permissions in front of each command. This is because sudo only applies to one command at a time. Either use sudo bash to get a root bash shell, or use quotes around the command with the -sh option, eg. like this:

sudo sh -c "echo '/usr/local/lib' >> /etc/ld.so.conf"

Perhaps this should be made clear in the otherwise excellent guide?

eddelbuettel commented 5 years ago

The idea is to run the entire script at once, ie do

sudo script.sh

Please try that. I am pretty sure that is what I did, and what works.

emilBeBri commented 5 years ago

Ah of course :)