I can't call dpkg -i within a shell script [on hold]

Multi tool use
Multi tool use











up vote
0
down vote

favorite












I am on a Google cloud machine and I want to install CUDA.



When I type in the following commands successively, all works fine:



wget https://developer.nvidia.com/compute/cuda/8.0/Prod2/local_installers/cuda-repo-ubuntu1604-8-0-local-ga2_8.0.61-1_amd64-deb

sudo dpkg -i cuda-repo-ubuntu1604-8-0-local-ga2_8.0.61-1_amd64.deb


But when I embedd the previous code in an install.sh file like the following



 #!/bin/sh

wget https://developer.nvidia.com/compute/cuda/8.0/Prod2/local_installers/cuda-repo-ubuntu1604-8-0-local-ga2_8.0.61-1_amd64-deb

sudo dpkg -i cuda-repo-ubuntu1604-8-0-local-ga2_8.0.61-1_amd64.deb


and I call the file like this:



source ./install.sh


I get the following error



dpkg: error: cannot access archive 'cuda-repo-ubuntu1604-8-0-local-ga2_8.0.61-1_amd64.deb': No such file or directory


I am 100% sure that I am located where the file is before calling the script. I am using Ubuntu 18.1










share|improve this question







New contributor




Marouen is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











put on hold as off-topic by steeldriver, N0rbert, karel, Eric Carvalho, muru Nov 28 at 1:24


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "This describes a problem that can't be reproduced, that seemingly went away on its own or was only relevant to a very specific period of time. It's off-topic as it's unlikely to help future readers." – steeldriver, N0rbert, karel, Eric Carvalho, muru

If this question can be reworded to fit the rules in the help center, please edit the question.









  • 3




    Does the file name end in .deb, or -deb?
    – steeldriver
    Nov 25 at 14:55










  • It was a -deb. A million thanks, issue fixed. It is just like when you spend hours looking for a needle in a haystack.
    – Marouen
    Nov 25 at 14:58















up vote
0
down vote

favorite












I am on a Google cloud machine and I want to install CUDA.



When I type in the following commands successively, all works fine:



wget https://developer.nvidia.com/compute/cuda/8.0/Prod2/local_installers/cuda-repo-ubuntu1604-8-0-local-ga2_8.0.61-1_amd64-deb

sudo dpkg -i cuda-repo-ubuntu1604-8-0-local-ga2_8.0.61-1_amd64.deb


But when I embedd the previous code in an install.sh file like the following



 #!/bin/sh

wget https://developer.nvidia.com/compute/cuda/8.0/Prod2/local_installers/cuda-repo-ubuntu1604-8-0-local-ga2_8.0.61-1_amd64-deb

sudo dpkg -i cuda-repo-ubuntu1604-8-0-local-ga2_8.0.61-1_amd64.deb


and I call the file like this:



source ./install.sh


I get the following error



dpkg: error: cannot access archive 'cuda-repo-ubuntu1604-8-0-local-ga2_8.0.61-1_amd64.deb': No such file or directory


I am 100% sure that I am located where the file is before calling the script. I am using Ubuntu 18.1










share|improve this question







New contributor




Marouen is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











put on hold as off-topic by steeldriver, N0rbert, karel, Eric Carvalho, muru Nov 28 at 1:24


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "This describes a problem that can't be reproduced, that seemingly went away on its own or was only relevant to a very specific period of time. It's off-topic as it's unlikely to help future readers." – steeldriver, N0rbert, karel, Eric Carvalho, muru

If this question can be reworded to fit the rules in the help center, please edit the question.









  • 3




    Does the file name end in .deb, or -deb?
    – steeldriver
    Nov 25 at 14:55










  • It was a -deb. A million thanks, issue fixed. It is just like when you spend hours looking for a needle in a haystack.
    – Marouen
    Nov 25 at 14:58













up vote
0
down vote

favorite









up vote
0
down vote

favorite











I am on a Google cloud machine and I want to install CUDA.



When I type in the following commands successively, all works fine:



wget https://developer.nvidia.com/compute/cuda/8.0/Prod2/local_installers/cuda-repo-ubuntu1604-8-0-local-ga2_8.0.61-1_amd64-deb

sudo dpkg -i cuda-repo-ubuntu1604-8-0-local-ga2_8.0.61-1_amd64.deb


But when I embedd the previous code in an install.sh file like the following



 #!/bin/sh

wget https://developer.nvidia.com/compute/cuda/8.0/Prod2/local_installers/cuda-repo-ubuntu1604-8-0-local-ga2_8.0.61-1_amd64-deb

sudo dpkg -i cuda-repo-ubuntu1604-8-0-local-ga2_8.0.61-1_amd64.deb


and I call the file like this:



source ./install.sh


I get the following error



dpkg: error: cannot access archive 'cuda-repo-ubuntu1604-8-0-local-ga2_8.0.61-1_amd64.deb': No such file or directory


I am 100% sure that I am located where the file is before calling the script. I am using Ubuntu 18.1










share|improve this question







New contributor




Marouen is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











I am on a Google cloud machine and I want to install CUDA.



When I type in the following commands successively, all works fine:



wget https://developer.nvidia.com/compute/cuda/8.0/Prod2/local_installers/cuda-repo-ubuntu1604-8-0-local-ga2_8.0.61-1_amd64-deb

sudo dpkg -i cuda-repo-ubuntu1604-8-0-local-ga2_8.0.61-1_amd64.deb


But when I embedd the previous code in an install.sh file like the following



 #!/bin/sh

wget https://developer.nvidia.com/compute/cuda/8.0/Prod2/local_installers/cuda-repo-ubuntu1604-8-0-local-ga2_8.0.61-1_amd64-deb

sudo dpkg -i cuda-repo-ubuntu1604-8-0-local-ga2_8.0.61-1_amd64.deb


and I call the file like this:



source ./install.sh


I get the following error



dpkg: error: cannot access archive 'cuda-repo-ubuntu1604-8-0-local-ga2_8.0.61-1_amd64.deb': No such file or directory


I am 100% sure that I am located where the file is before calling the script. I am using Ubuntu 18.1







bash dpkg cuda






share|improve this question







New contributor




Marouen is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question







New contributor




Marouen is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question






New contributor




Marouen is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked Nov 25 at 14:48









Marouen

1011




1011




New contributor




Marouen is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Marouen is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Marouen is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




put on hold as off-topic by steeldriver, N0rbert, karel, Eric Carvalho, muru Nov 28 at 1:24


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "This describes a problem that can't be reproduced, that seemingly went away on its own or was only relevant to a very specific period of time. It's off-topic as it's unlikely to help future readers." – steeldriver, N0rbert, karel, Eric Carvalho, muru

If this question can be reworded to fit the rules in the help center, please edit the question.




put on hold as off-topic by steeldriver, N0rbert, karel, Eric Carvalho, muru Nov 28 at 1:24


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "This describes a problem that can't be reproduced, that seemingly went away on its own or was only relevant to a very specific period of time. It's off-topic as it's unlikely to help future readers." – steeldriver, N0rbert, karel, Eric Carvalho, muru

If this question can be reworded to fit the rules in the help center, please edit the question.








  • 3




    Does the file name end in .deb, or -deb?
    – steeldriver
    Nov 25 at 14:55










  • It was a -deb. A million thanks, issue fixed. It is just like when you spend hours looking for a needle in a haystack.
    – Marouen
    Nov 25 at 14:58














  • 3




    Does the file name end in .deb, or -deb?
    – steeldriver
    Nov 25 at 14:55










  • It was a -deb. A million thanks, issue fixed. It is just like when you spend hours looking for a needle in a haystack.
    – Marouen
    Nov 25 at 14:58








3




3




Does the file name end in .deb, or -deb?
– steeldriver
Nov 25 at 14:55




Does the file name end in .deb, or -deb?
– steeldriver
Nov 25 at 14:55












It was a -deb. A million thanks, issue fixed. It is just like when you spend hours looking for a needle in a haystack.
– Marouen
Nov 25 at 14:58




It was a -deb. A million thanks, issue fixed. It is just like when you spend hours looking for a needle in a haystack.
– Marouen
Nov 25 at 14:58















active

oldest

votes






















active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes

fOUfKcM6JnDSmUa5nHi86NBZLHfK BDuTspV Csi2M
QV vt 7763 JZHRrnyadq9X8 A,o4ywhYnM

Popular posts from this blog

Monte Fuji

Running commands remotely through an RDP connection

Mangá