Install scala: no bin after decompression

I download scala-sources-2.12.6.tar.gz “Sources”, my os is linux Redhat,
After decompression, here just shows these in scala-2.12.6:

CONTRIBUTING.md  LICENSE    admin      dbuild-meta.json  gitconfig.SAMPLE  scripts  src   tools
Gemfile          README.md  build.sbt  doc               project           spec     test  versions.properties

No “bin” here, so I wonder add which path to environmental variable to use it? like by:

export SCALA_HOME="/home/beeshma/scala-2.10.6"
export PATH="$PATH:$SCALA_HOME/bin"

"src" contains: (no executable file)

build     eclipse   interactive  library-aux  partest-extras     reflect  repl-jline  scalap
compiler  intellij  library      manual       partest-javaagent  repl     scaladoc

And I have installed sbt bin into my environmental variable, my java is 1.8.

Any suggestion will be grateful!

Where did you download it from? Also if the file is called “sources” why do you expect it to containing anything else?

1 Like

It wasn’t a rhetorical question.

1 Like

download place, at the bottom of this page.
expect it to containing “bin” so I can install like other sofewares…

??? Hard to understand for me, are there some softwares work this way?

binary file you mentioned is used for Mac OS X, Unix, Cygwin, but I’m linux Redhat, so it’s my choose

If you’re on redhat you will probably want the rpm package. If you don’t want to install a package, those unix executables should also work. It’s just jar files and bash scripts.

1 Like

In my sbt folder, contains three folders, they are

bin conf lib
and in folder bin, there are one sbt executable file and others files
so I directly put
export PATH="/home/myname.../sbt/bin:$PATH"
in my .bashrc

I just hope scala install like this, now I don’t know what means “install” scala, but I guess not just download.

  • Linux Redhat is a Unix, so you can still use the Unix package (https://downloads.lightbend.com/scala/2.12.6/scala-2.12.6.tgz) and “install” it like you did for SBT.
  • as others said, installing the RPM would also work.
  • nothing special about scala. For all software, if you download the sources, you cannot use it.* Download a binary package.

*or you can compile them and then use them, but that’s much more complicated and you do not need that.

1 Like

I see, very helpful, thanks!

1 Like

Can I say Debian is a Unix?

Every Linux is a Unix. So yes, Debian as well. And Ubuntu, and ArchLinux, and Gentoo, and many many others.

Thanks since I just wonder why they show like:
QQ%E5%9B%BE%E7%89%8720180906235321
so I think debian is special, not same with Unix and different with other linux os. May be at least for scala here, they are same thing, I guess.

.deb is a Debian Package. The package manager that comes with Debian (and with several other popular Linux distributions, like Ubuntu) uses Debian Packages. While you can also use the general tarball and install manually, if you want to make use of the Debian Package Manager, you want to get the Debian package. It may be a good idea to change Debian to Debian Package.

Also, while I don’t want to have the discussion whether Linux distributions are technically Unixes, adding “Linux” to that list (and maybe even removing Unix) may be a good idea.

1 Like

That one is only for Debian. On Debian you can use that one, or the one that says Unix. The .tgz is more portable.

I see, thank you giving me greater insight for this!

If you are on RedHat, the easiest ad cleanest is to use the RPM file and install it using a standard package manager such as rpm or dnf. This makes it also easy to upgrade or remove.

Most Linux distributions fall into one of two categories: those that use the RedHat package management (using RPM files) and those that use the Debian package management (using DEB files). For example, Ubuntu has Debian package management and uses DEB files.

Thanks!
I tried rpm,
rpm2cpio scala-2.12.6.rpm | cpio -div
but it shows me permission problem, copy part of them here:

cpio: ./usr/share/doc/scala/tools/scala.html: Cannot open: Permission denied                                                                        [85/1845]
./usr/share/doc/scala/tools/scala.html
cpio: ./usr/share/doc/scala/tools/scalac.html: Cannot open: Permission denied
./usr/share/doc/scala/tools/scalac.html
cpio: ./usr/share/doc/scala/tools/scaladoc.html: Cannot open: Permission denied
./usr/share/doc/scala/tools/scaladoc.html
cpio: ./usr/share/doc/scala/tools/scalap.html: Cannot open: Permission denied 

So I choose the first line’s scala-2.12.6.tgz, I also get my expected bin fold, this a solve way under my present situation.

I’m not sure what you are trying to do using rpm2cpio. Don’t you have root/sudo permissions?

It should be something like

sudo rpm -i scala-2.12.6.rpm

yes, I’m not root