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

maven centos 文章 2022-07-27 22:13 912 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 使用 wagon-maven-plugin 自动编译并发布jar到服务器
centos下maven install出错 No compiler is provided in this environment
centos下安装maven
java wagon-maven-plugin插件说明
随便看看
微信开放平台跟公众平台有什么区别? 3517
怎么添加小程序支付功能? 4312
教育科技公司申请微信支付被拒绝? 4695
微信公众号免300认证教程 5776
小程序已经上线,作为管理员无法在小程序数据助手查看数据? 5187
小程序广告组件通过审核,但是小程序内没有显示广告? 4961
企业微信通讯录账号被管理员误/恶意删除,怎么办? 9389
问题? 8909
如何快速搭建抽奖助手小程序(无需代码知识) 6039
许涛 大哥在吗, 要解冻小程序的时候提示信息主体不一致, 能帮忙看下吗? 7343