首页 > 代码库 > spark mllib配置pom.xml错误 Multiple markers at this line Could not transfer artifact net.sf.opencsv:opencsv:jar:2.3 from/to central (https://repo.maven.apache.org/maven2): repo.maven.apache.org
spark mllib配置pom.xml错误 Multiple markers at this line Could not transfer artifact net.sf.opencsv:opencsv:jar:2.3 from/to central (https://repo.maven.apache.org/maven2): repo.maven.apache.org
刚刚spark mllib,在maven repository网站http://mvnrepository.com/中查询mllib后得到相关库的最新dependence为:
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-mllib-local_2.11</artifactId>
<version>2.1.0</version>
</dependency>
但是遇到错误:
Multiple markers at this line
- Failure to transfer
net.sf.opencsv:opencsv:jar:2.3
from https://repo.maven.apache.org/maven2
was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced.
Original error: Could not transfer artifact
net.sf.opencsv:opencsv:jar:2.3
from/to central (https://repo.maven.apache.org/maven2):
repo.maven.apache.org
查找后尝试过得方法有:
方案1:认为有的库没有下载完整,因此删除~/.m2/repository下所有内容——>重启eclipse——>让eclipse自动下载新的包;
结果:不好使,没有解决掉;
方案2:(误打误撞的方法,见笑了)也认为没有下载完整,更改其他版本的mllib库为:
<dependency> <!-- Spark dependency -->
<groupId>org.apache.spark</groupId>
<artifactId>spark-mllib_2.10</artifactId>
<version>1.6.1</version>
<scope>provided</scope>
</dependency>
然后,eclipse自动下载库文件,等待完成(中间不要终止),然后错误消失。甚至更改为最新版本库也没有出现原来错误。
总结:
应该还是库文件不完整造成的问题,但是也还不确定,希望以后可以慢慢理解其中原理。
spark mllib配置pom.xml错误 Multiple markers at this line Could not transfer artifact net.sf.opencsv:opencsv:jar:2.3 from/to central (https://repo.maven.apache.org/maven2): repo.maven.apache.org