Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

-bash: scala: command not found

I'm trying to install scala on my mac (Maverick). I downloaded and unarchived it. I then put myself from where it was unarchived and inside the /bin folder in the terminal. But when I run "scala" or "scalac" I get :

-bash: scala: command not found

Why?

like image 455
Paul Boosz Avatar asked Sep 28 '15 05:09

Paul Boosz


3 Answers

I always suggest that mac users install homebrew and use homebrew as their primary package installer to install software.

Installing scala is as simple as

brew install scala

Homebrew will also install/fix java dependencies for you and handle path issues (I believe)

like image 185
Zee Avatar answered Sep 19 '22 15:09

Zee


I get the same issue and quickly I found everything is fine, if you write the correct path into your .bash_profile.

The only thing you need is to close current terminal and open a new one, on which Scala would work.

Hope this work for you.

like image 28
Wallace Avatar answered Sep 21 '22 15:09

Wallace


do you have Java installed and available on your PATH http://sourabhbajaj.com/mac-setup/Java/README.html the same author also provides good Scala / SBT setup info http://sourabhbajaj.com/mac-setup/Java/README.html

like image 31
ozOli Avatar answered Sep 18 '22 15:09

ozOli