adhoc包无法安装_Linux安装sbt遇到无法下载依赖包

在遵循厦门大学的sbt安装教程时,遇到adhoc包无法下载的问题。错误提示表明格式不正确。解决方案是修改配置,将URL更改为http版本,并使用提供的sbt-launch.jar文件。若下载速度慢,可以使用分享的百度网盘链接获取打包好的文件,提取码为j9wv。此外,更新sbt.boot.properties文件,添加oschina镜像并转换所有https为http。
摘要由CSDN通过智能技术生成

首先参考的是这篇文章,在根据厦门大学的安装教程打包编译sbt的时候遇到无法下载依赖包

解决Maven、sbt无法下载依赖包的问题_厦大数据库实验室博客​dblab.xmu.edu.cn
25d8d7ab413fd3bf423d6a7b95af9ea7.png

显示出:

Getting org.scala-sbt sbt 0.13.9 ...

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

    ==== local: tried
      /home/hadoop/.ivy2/local/org.scala-sbt/sbt/0.13.9/ivys/ivy.xml
      -- artifact org.scala-sbt#sbt;0.13.9!sbt.jar:
      /home/hadoop/.ivy2/local/org.scala-sbt/sbt/0.13.9/jars/sbt.jar

...

        ::::::::::::::::::::::::::::::::::::::::::::::
        ::          UNRESOLVED DEPENDENCIES         ::
        ::::::::::::::::::::::::::::::::::::::::::::::
        :: org.scala-sbt#sbt;0.13.9: not found
        ::::::::::::::::::::::::::::::::::::::::::::::


:::: ERRORS
    Server access Error: java.security.ProviderException: java.security.KeyException url=https://jcenter.bintray.com/org/scala-sbt/sbt/0.13.9/sbt-0.13.9.pom

:: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS
unresolved dependency: org.scala-sbt#sbt;0.13.9: not found
Error during sbt execution: Error retrieving required libraries
  (see /home/hadoop/.sbt/boot/update.log for complete log)
Error: Could not retrieve sbt 0.13.9

这样的报错,但是根据这篇文章来下载官方的sbt的话,会报格式不对

--2019-03-29 04:47:25--  https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt-launch/0.13.9/sbt-launch.jar
Resolving repo.typesafe.com (repo.typesafe.com)... 34.225.142.206, 52.4.182.153
Connecting to repo.typesafe.com (repo.typesafe.com)|34.225.142.206|:443... connected.
ERROR: cannot verify repo.typesafe.com's certificate, issued by ‘/C=GB/ST=Greater Manchester/L=Salford/O=Sectigo Limited/CN=Sectigo RSA Domain Validation Secure Server CA’:
  Unable to locally verify the issuer's authority.
To connect to repo.typesafe.com insecurely, use `--no-check-certificate'.

因此根据报错提示,应该将

wget https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt-launch/0.13.9/sbt-launch.jar -O ./sbt-launch.jar 

修改成

wget --no-check-certificate https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt-launch/0.13.9/sbt-launch.jar -O ./sbt-launch.jar 

再进行后续的下载修改再打包。

如果下载慢的话可以使用打包好的sbt-launch.jar,在此给出自己打包好的文件

链接:https://pan.baidu.com/s/1CF6S8D5kKZZAVEs67KAZag

提取码:j9wv


最新发现,sbt-launch.jar的./sbt/sbt.boot.properties里我只增加了一条 oschina 镜像,并且将原有的 https 镜像都改为相应的 http 版

[repositories]
  local
  oschina: http://maven.oschina.net/content/groups/public/
  jcenter: http://jcenter.bintray.com/
  typesafe-ivy-releases: http://repo.typesafe.com/typesafe/ivy-releases/, [organization]/[module]/[revision]/[type]s/[artifact](-[classifier]).[ext], bootOnly
  maven-central

和原文的区别是减少了最后一句话的地址,因为打包文件里面并没有这行,而之前加了这行之后依旧不能执行

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值