tar “no such file or directory” error during Scala installation












-3














I followed these steps to download and install scala but faced some issues.



Install Scala




  1. First download scala-2.12.1.tgz from the scala site


  2. Then run the following commands in the terminal



    sudo mkdir /usr/local/src/scala
    sudo tar -xvf sscala-2.12.1 .tgz -C /usr/local/src/scala/nano .bashrc


    after that add this variable at the end of opened .bashrc file



    export SCALA_HOME=/usr/local/src/scala/scala-2.12.1
    export PATH=$SCALA_HOME/bin:$PATH
    . .bashrc



When I wrote the 2nd command in terminal it showed



tar: usr/local/src/scala/nano.bashrc: cannot open: no such file or directory
tar: Error is not recoverable: existing now.


I need help to resolve this issue.










share|improve this question




















  • 2




    The command says /usr/local/src/scala/nano .bashrc with a space in between, the error says usr/local/src/scala/nano.bashrc without a space. Please double check the commands you ran and the manual you're using.
    – muru
    Jul 29 '18 at 9:10










  • i've run the command without space but it still shows the same error.
    – Kashf Ul HUdha
    Jul 29 '18 at 9:13










  • @KashfUlHUdha FYI `scala is packaged on all supported Ubuntu versions. On 14.04 LTS you will get 2.9, on newer versions - you get 2.11. It is unclear why you self-extracted non-supported later installation....
    – N0rbert
    Jul 29 '18 at 11:01








  • 2




    BTW, adding . .bashrc to .bashrc is a bad idea. You won't be able to use Bash on your account if you do that, until you remove it that line!
    – Zanna
    Jul 29 '18 at 20:42


















-3














I followed these steps to download and install scala but faced some issues.



Install Scala




  1. First download scala-2.12.1.tgz from the scala site


  2. Then run the following commands in the terminal



    sudo mkdir /usr/local/src/scala
    sudo tar -xvf sscala-2.12.1 .tgz -C /usr/local/src/scala/nano .bashrc


    after that add this variable at the end of opened .bashrc file



    export SCALA_HOME=/usr/local/src/scala/scala-2.12.1
    export PATH=$SCALA_HOME/bin:$PATH
    . .bashrc



When I wrote the 2nd command in terminal it showed



tar: usr/local/src/scala/nano.bashrc: cannot open: no such file or directory
tar: Error is not recoverable: existing now.


I need help to resolve this issue.










share|improve this question




















  • 2




    The command says /usr/local/src/scala/nano .bashrc with a space in between, the error says usr/local/src/scala/nano.bashrc without a space. Please double check the commands you ran and the manual you're using.
    – muru
    Jul 29 '18 at 9:10










  • i've run the command without space but it still shows the same error.
    – Kashf Ul HUdha
    Jul 29 '18 at 9:13










  • @KashfUlHUdha FYI `scala is packaged on all supported Ubuntu versions. On 14.04 LTS you will get 2.9, on newer versions - you get 2.11. It is unclear why you self-extracted non-supported later installation....
    – N0rbert
    Jul 29 '18 at 11:01








  • 2




    BTW, adding . .bashrc to .bashrc is a bad idea. You won't be able to use Bash on your account if you do that, until you remove it that line!
    – Zanna
    Jul 29 '18 at 20:42
















-3












-3








-3







I followed these steps to download and install scala but faced some issues.



Install Scala




  1. First download scala-2.12.1.tgz from the scala site


  2. Then run the following commands in the terminal



    sudo mkdir /usr/local/src/scala
    sudo tar -xvf sscala-2.12.1 .tgz -C /usr/local/src/scala/nano .bashrc


    after that add this variable at the end of opened .bashrc file



    export SCALA_HOME=/usr/local/src/scala/scala-2.12.1
    export PATH=$SCALA_HOME/bin:$PATH
    . .bashrc



When I wrote the 2nd command in terminal it showed



tar: usr/local/src/scala/nano.bashrc: cannot open: no such file or directory
tar: Error is not recoverable: existing now.


I need help to resolve this issue.










share|improve this question















I followed these steps to download and install scala but faced some issues.



Install Scala




  1. First download scala-2.12.1.tgz from the scala site


  2. Then run the following commands in the terminal



    sudo mkdir /usr/local/src/scala
    sudo tar -xvf sscala-2.12.1 .tgz -C /usr/local/src/scala/nano .bashrc


    after that add this variable at the end of opened .bashrc file



    export SCALA_HOME=/usr/local/src/scala/scala-2.12.1
    export PATH=$SCALA_HOME/bin:$PATH
    . .bashrc



When I wrote the 2nd command in terminal it showed



tar: usr/local/src/scala/nano.bashrc: cannot open: no such file or directory
tar: Error is not recoverable: existing now.


I need help to resolve this issue.







command-line bashrc tar scala






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jul 31 '18 at 5:47









Zanna

50.1k13131240




50.1k13131240










asked Jul 29 '18 at 9:06









Kashf Ul HUdha

11




11








  • 2




    The command says /usr/local/src/scala/nano .bashrc with a space in between, the error says usr/local/src/scala/nano.bashrc without a space. Please double check the commands you ran and the manual you're using.
    – muru
    Jul 29 '18 at 9:10










  • i've run the command without space but it still shows the same error.
    – Kashf Ul HUdha
    Jul 29 '18 at 9:13










  • @KashfUlHUdha FYI `scala is packaged on all supported Ubuntu versions. On 14.04 LTS you will get 2.9, on newer versions - you get 2.11. It is unclear why you self-extracted non-supported later installation....
    – N0rbert
    Jul 29 '18 at 11:01








  • 2




    BTW, adding . .bashrc to .bashrc is a bad idea. You won't be able to use Bash on your account if you do that, until you remove it that line!
    – Zanna
    Jul 29 '18 at 20:42
















  • 2




    The command says /usr/local/src/scala/nano .bashrc with a space in between, the error says usr/local/src/scala/nano.bashrc without a space. Please double check the commands you ran and the manual you're using.
    – muru
    Jul 29 '18 at 9:10










  • i've run the command without space but it still shows the same error.
    – Kashf Ul HUdha
    Jul 29 '18 at 9:13










  • @KashfUlHUdha FYI `scala is packaged on all supported Ubuntu versions. On 14.04 LTS you will get 2.9, on newer versions - you get 2.11. It is unclear why you self-extracted non-supported later installation....
    – N0rbert
    Jul 29 '18 at 11:01








  • 2




    BTW, adding . .bashrc to .bashrc is a bad idea. You won't be able to use Bash on your account if you do that, until you remove it that line!
    – Zanna
    Jul 29 '18 at 20:42










2




2




The command says /usr/local/src/scala/nano .bashrc with a space in between, the error says usr/local/src/scala/nano.bashrc without a space. Please double check the commands you ran and the manual you're using.
– muru
Jul 29 '18 at 9:10




The command says /usr/local/src/scala/nano .bashrc with a space in between, the error says usr/local/src/scala/nano.bashrc without a space. Please double check the commands you ran and the manual you're using.
– muru
Jul 29 '18 at 9:10












i've run the command without space but it still shows the same error.
– Kashf Ul HUdha
Jul 29 '18 at 9:13




i've run the command without space but it still shows the same error.
– Kashf Ul HUdha
Jul 29 '18 at 9:13












@KashfUlHUdha FYI `scala is packaged on all supported Ubuntu versions. On 14.04 LTS you will get 2.9, on newer versions - you get 2.11. It is unclear why you self-extracted non-supported later installation....
– N0rbert
Jul 29 '18 at 11:01






@KashfUlHUdha FYI `scala is packaged on all supported Ubuntu versions. On 14.04 LTS you will get 2.9, on newer versions - you get 2.11. It is unclear why you self-extracted non-supported later installation....
– N0rbert
Jul 29 '18 at 11:01






2




2




BTW, adding . .bashrc to .bashrc is a bad idea. You won't be able to use Bash on your account if you do that, until you remove it that line!
– Zanna
Jul 29 '18 at 20:42






BTW, adding . .bashrc to .bashrc is a bad idea. You won't be able to use Bash on your account if you do that, until you remove it that line!
– Zanna
Jul 29 '18 at 20:42












1 Answer
1






active

oldest

votes


















3














You got the following error:



tar: usr/local/src/scala/nano.bashrc: cannot open: no such file or directory
tar: Error is not recoverable: existing now.


because you didn't extract the contents of scala-2.12.1.tgz because of a type error. Instead of:



sudo tar -xvf sscala-2.12.1 .tgz -C /usr/local/src/scala/nano .bashrc


The correct commands should be:



sudo mkdir /usr/local/src/scala/  
sudo tar -xvf scala-2.12.1.tgz -C /usr/local/src/scala/
nano .bashrc


These commands will solve the immediate problem in the question, however it should be noted that according to the official Scala website the most popular way to get Scala is either using Scala through sbt, the Scala build tool, or to use Scala through an IDE. Using Scala through IntelliJ IDE is recommended for beginners who are not familiar with the command line. The free intellij-idea-community snap package can be installed in all currently supported versions of Ubuntu with the following commands:



sudo snap install intellij-idea-community --classic  


In Ubuntu 16.04 and 18.04 the package name of the required Java 8 JDK in the default Ubuntu repositories is openjdk-8-jdk and it can be installed by the following command:



sudo apt install openjdk-8-jdk  


Run the following commands to export the path to SCALA_HOME to the PATH variable.



export SCALA_HOME="/usr/local/src/scala/scala-2.12.1"
export PATH=$SCALA_HOME/bin:$PATH
source ~/.bashrc





share|improve this answer



















  • 1




    Thank u this issue is solved. now .bashrc file is opened.
    – Kashf Ul HUdha
    Jul 29 '18 at 9:39






  • 1




    I've already installed jdk.
    – Kashf Ul HUdha
    Jul 29 '18 at 9:40










  • Can u plz tell me how to add those variables in .bashrc file???
    – Kashf Ul HUdha
    Jul 29 '18 at 9:44











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1060474%2ftar-no-such-file-or-directory-error-during-scala-installation%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









3














You got the following error:



tar: usr/local/src/scala/nano.bashrc: cannot open: no such file or directory
tar: Error is not recoverable: existing now.


because you didn't extract the contents of scala-2.12.1.tgz because of a type error. Instead of:



sudo tar -xvf sscala-2.12.1 .tgz -C /usr/local/src/scala/nano .bashrc


The correct commands should be:



sudo mkdir /usr/local/src/scala/  
sudo tar -xvf scala-2.12.1.tgz -C /usr/local/src/scala/
nano .bashrc


These commands will solve the immediate problem in the question, however it should be noted that according to the official Scala website the most popular way to get Scala is either using Scala through sbt, the Scala build tool, or to use Scala through an IDE. Using Scala through IntelliJ IDE is recommended for beginners who are not familiar with the command line. The free intellij-idea-community snap package can be installed in all currently supported versions of Ubuntu with the following commands:



sudo snap install intellij-idea-community --classic  


In Ubuntu 16.04 and 18.04 the package name of the required Java 8 JDK in the default Ubuntu repositories is openjdk-8-jdk and it can be installed by the following command:



sudo apt install openjdk-8-jdk  


Run the following commands to export the path to SCALA_HOME to the PATH variable.



export SCALA_HOME="/usr/local/src/scala/scala-2.12.1"
export PATH=$SCALA_HOME/bin:$PATH
source ~/.bashrc





share|improve this answer



















  • 1




    Thank u this issue is solved. now .bashrc file is opened.
    – Kashf Ul HUdha
    Jul 29 '18 at 9:39






  • 1




    I've already installed jdk.
    – Kashf Ul HUdha
    Jul 29 '18 at 9:40










  • Can u plz tell me how to add those variables in .bashrc file???
    – Kashf Ul HUdha
    Jul 29 '18 at 9:44
















3














You got the following error:



tar: usr/local/src/scala/nano.bashrc: cannot open: no such file or directory
tar: Error is not recoverable: existing now.


because you didn't extract the contents of scala-2.12.1.tgz because of a type error. Instead of:



sudo tar -xvf sscala-2.12.1 .tgz -C /usr/local/src/scala/nano .bashrc


The correct commands should be:



sudo mkdir /usr/local/src/scala/  
sudo tar -xvf scala-2.12.1.tgz -C /usr/local/src/scala/
nano .bashrc


These commands will solve the immediate problem in the question, however it should be noted that according to the official Scala website the most popular way to get Scala is either using Scala through sbt, the Scala build tool, or to use Scala through an IDE. Using Scala through IntelliJ IDE is recommended for beginners who are not familiar with the command line. The free intellij-idea-community snap package can be installed in all currently supported versions of Ubuntu with the following commands:



sudo snap install intellij-idea-community --classic  


In Ubuntu 16.04 and 18.04 the package name of the required Java 8 JDK in the default Ubuntu repositories is openjdk-8-jdk and it can be installed by the following command:



sudo apt install openjdk-8-jdk  


Run the following commands to export the path to SCALA_HOME to the PATH variable.



export SCALA_HOME="/usr/local/src/scala/scala-2.12.1"
export PATH=$SCALA_HOME/bin:$PATH
source ~/.bashrc





share|improve this answer



















  • 1




    Thank u this issue is solved. now .bashrc file is opened.
    – Kashf Ul HUdha
    Jul 29 '18 at 9:39






  • 1




    I've already installed jdk.
    – Kashf Ul HUdha
    Jul 29 '18 at 9:40










  • Can u plz tell me how to add those variables in .bashrc file???
    – Kashf Ul HUdha
    Jul 29 '18 at 9:44














3












3








3






You got the following error:



tar: usr/local/src/scala/nano.bashrc: cannot open: no such file or directory
tar: Error is not recoverable: existing now.


because you didn't extract the contents of scala-2.12.1.tgz because of a type error. Instead of:



sudo tar -xvf sscala-2.12.1 .tgz -C /usr/local/src/scala/nano .bashrc


The correct commands should be:



sudo mkdir /usr/local/src/scala/  
sudo tar -xvf scala-2.12.1.tgz -C /usr/local/src/scala/
nano .bashrc


These commands will solve the immediate problem in the question, however it should be noted that according to the official Scala website the most popular way to get Scala is either using Scala through sbt, the Scala build tool, or to use Scala through an IDE. Using Scala through IntelliJ IDE is recommended for beginners who are not familiar with the command line. The free intellij-idea-community snap package can be installed in all currently supported versions of Ubuntu with the following commands:



sudo snap install intellij-idea-community --classic  


In Ubuntu 16.04 and 18.04 the package name of the required Java 8 JDK in the default Ubuntu repositories is openjdk-8-jdk and it can be installed by the following command:



sudo apt install openjdk-8-jdk  


Run the following commands to export the path to SCALA_HOME to the PATH variable.



export SCALA_HOME="/usr/local/src/scala/scala-2.12.1"
export PATH=$SCALA_HOME/bin:$PATH
source ~/.bashrc





share|improve this answer














You got the following error:



tar: usr/local/src/scala/nano.bashrc: cannot open: no such file or directory
tar: Error is not recoverable: existing now.


because you didn't extract the contents of scala-2.12.1.tgz because of a type error. Instead of:



sudo tar -xvf sscala-2.12.1 .tgz -C /usr/local/src/scala/nano .bashrc


The correct commands should be:



sudo mkdir /usr/local/src/scala/  
sudo tar -xvf scala-2.12.1.tgz -C /usr/local/src/scala/
nano .bashrc


These commands will solve the immediate problem in the question, however it should be noted that according to the official Scala website the most popular way to get Scala is either using Scala through sbt, the Scala build tool, or to use Scala through an IDE. Using Scala through IntelliJ IDE is recommended for beginners who are not familiar with the command line. The free intellij-idea-community snap package can be installed in all currently supported versions of Ubuntu with the following commands:



sudo snap install intellij-idea-community --classic  


In Ubuntu 16.04 and 18.04 the package name of the required Java 8 JDK in the default Ubuntu repositories is openjdk-8-jdk and it can be installed by the following command:



sudo apt install openjdk-8-jdk  


Run the following commands to export the path to SCALA_HOME to the PATH variable.



export SCALA_HOME="/usr/local/src/scala/scala-2.12.1"
export PATH=$SCALA_HOME/bin:$PATH
source ~/.bashrc






share|improve this answer














share|improve this answer



share|improve this answer








edited Dec 19 '18 at 16:10

























answered Jul 29 '18 at 9:15









karel

57.3k12127146




57.3k12127146








  • 1




    Thank u this issue is solved. now .bashrc file is opened.
    – Kashf Ul HUdha
    Jul 29 '18 at 9:39






  • 1




    I've already installed jdk.
    – Kashf Ul HUdha
    Jul 29 '18 at 9:40










  • Can u plz tell me how to add those variables in .bashrc file???
    – Kashf Ul HUdha
    Jul 29 '18 at 9:44














  • 1




    Thank u this issue is solved. now .bashrc file is opened.
    – Kashf Ul HUdha
    Jul 29 '18 at 9:39






  • 1




    I've already installed jdk.
    – Kashf Ul HUdha
    Jul 29 '18 at 9:40










  • Can u plz tell me how to add those variables in .bashrc file???
    – Kashf Ul HUdha
    Jul 29 '18 at 9:44








1




1




Thank u this issue is solved. now .bashrc file is opened.
– Kashf Ul HUdha
Jul 29 '18 at 9:39




Thank u this issue is solved. now .bashrc file is opened.
– Kashf Ul HUdha
Jul 29 '18 at 9:39




1




1




I've already installed jdk.
– Kashf Ul HUdha
Jul 29 '18 at 9:40




I've already installed jdk.
– Kashf Ul HUdha
Jul 29 '18 at 9:40












Can u plz tell me how to add those variables in .bashrc file???
– Kashf Ul HUdha
Jul 29 '18 at 9:44




Can u plz tell me how to add those variables in .bashrc file???
– Kashf Ul HUdha
Jul 29 '18 at 9:44


















draft saved

draft discarded




















































Thanks for contributing an answer to Ask Ubuntu!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1060474%2ftar-no-such-file-or-directory-error-during-scala-installation%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

Mangá

Eduardo VII do Reino Unido