VirtualBox:Ubuntu:Maven org.apache.Maven.plugins:Maven安装plugin:2.4或其依赖项之一无法解析

VirtualBox:Ubuntu:Maven org.apache.Maven.plugins:Maven安装plugin:2.4或其依赖项之一无法解析,ubuntu,virtualbox,maven-3,Ubuntu,Virtualbox,Maven 3,我在尝试maven安装时遇到了这个错误核心 org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-install-plugin:jar:2.4: Could not transfer artifact org.ap

我在尝试maven安装时遇到了这个错误核心

org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-install-plugin:jar:2.4: Could not transfer artifact org.apache.maven.plugins:maven-install-plugin:pom:2.4 from/to central (https://repo.maven.apache.org/maven2): repo.maven.apache.org
我发现了几个与此相关的话题:

我知道这是因为LAN代理配置,问题是,我没有LAN代理,我很确定这是因为virtualbox网络配置,但我不知道它们之间如何关联,更重要的是如何解决它。有人能帮我解决这个问题吗

  • 主机:MAC OS X
  • Virtualbox:5.2.16
  • Ubuntu:18.04
  • 马文:3.5.2

提前谢谢你

嗯,我发现了使用-e swith运行maven时出现的错误,我注意到了一个SSL错误,这是因为我使用的是Java 1.7,它不支持TLS 1.2,所以我将我的
Java_HOME
切换到了1.8文件夹,它工作得很好

如果您有同样的问题,您可以在终端
echo$JAVA_HOME
中使用此命令检查
JAVA_HOME
如果您需要更改路径,您可以使用
sudo nano/etc/environment
和更改
JAVA_HOME
路径。在我的例子中,路径是
/usr/lib/jvm/java-1.8.0-openjdk-amd64

希望这有帮助,问候