centos下maven install出错 No compiler is provided in this environment

maven centos 文章 2022-07-27 22:13 946 0 全屏看文

AI助手支持GPT4.0

在centos下我安装的我以为的jdk1.8

yum install jdk

然后我执行了maven命令

mvn install

结果提示:

[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
[ERROR]
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException


搜了网上文章后得知,maven install jdk 并不会下载完整版JDK 只是下载了jre。我们需要运行:

yum install -y java-devel

image.png

等安装好后,我们再次执行

mvn install

然后就执行成功了。

image.png

-EOF-

AI助手支持GPT4.0


国内超级便宜服务器

摸鱼人热门新闻聚合

钻级赞助商 我要加入

开发者在线工具

第三方支付技术请加QQ群

相关文章
maven的pom中如何引用本地包而不是仓库里的
能不能在 maven build之后执行dos命令
ownloading from maven-default-http-blocker: http://0.0.0.0/com/xxxx/maven-metadata.xml
centos下安装maven
centos下maven install出错 No compiler is provided in this environment
随便看看
怎么添加小程序支付功能? 4516
教育科技公司申请微信支付被拒绝? 4798
微信公众号免300认证教程 5892
小程序已经上线,作为管理员无法在小程序数据助手查看数据? 5299
小程序广告组件通过审核,但是小程序内没有显示广告? 5067
企业微信通讯录账号被管理员误/恶意删除,怎么办? 9568
问题? 9047
如何快速搭建抽奖助手小程序(无需代码知识) 6177
许涛 大哥在吗, 要解冻小程序的时候提示信息主体不一致, 能帮忙看下吗? 7471
小程序搜一搜全称搜索不显示 麻烦解决一下!谢谢 6792