scalasbt

sbt not found on ubuntu


Hi I want to compile my application but I got this error

[Container] 2018/03/16 17:20:46 Running command chmod +x buildspec_build.sh && ./buildspec_build.sh
Getting org.scala-sbt sbt 0.13.11 (this may take some time)...

:: problems summary ::
:::: WARNINGS
module not found: org.scala-sbt#sbt;0.13.11

==== local: tried

sbt installation looks like this in buildspec_install.sh

apt-get install apt-transport-https
echo "deb https://dl.bintray.com/sbt/debian /" | sudo tee -a /etc/apt/sources.list.d/sbt.list
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2EE0EA64E40A89B84B2DF73499E82A75642AC823
apt-get update
apt-get install sbt

what could be the issue? Thanks in advance

UPDATE:

Also displayed is this error:

:: UNRESOLVED DEPENDENCIES ::

::::::::::::::::::::::::::::::::::::::::::::::

:: org.scala-sbt#sbt;0.13.11: not found

::::::::::::::::::::::::::::::::::::::::::::::


:::: ERRORS
Server access Error: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty url=https://repo1.maven.org/maven2/org/scala-sbt/sbt/0.13.11/sbt-0.13.11.pom

Solution

  • full working solution is:

    sudo update-ca-certificates -f
    sudo /var/lib/dpkg/info/ca-certificates-java.postinst configure
    
    echo "java installation ok"
    
    # install sbt
    echo "starting sbt installation"
    
    apt-get install -y apt-transport-https
    echo "deb https://dl.bintray.com/sbt/debian /" | sudo tee -a /etc/apt/sources.list.d/sbt.list
    apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2EE0EA64E40A89B84B2DF73499E82A75642AC823
    
    
    apt-get update
    apt-get install -y sbt