Centos使用Maven构建项目失败,提示No compiler is provided in this environment. Perhaps you are running

Maven 构建失败了,提示没有编译器

Centos使用Maven构建项目失败,提示No compiler is provided in this environment. Perhaps you are running

但是我们之前确实是安装了 jdk的呀,java -version也有输出

Centos使用Maven构建项目失败,提示No compiler is provided in this environment. Perhaps you are running

但是输入javac 确实提示命令没找到

Centos使用Maven构建项目失败,提示No compiler is provided in this environment. Perhaps you are running

说明我们之前只是安装了jre 没有安装jdk, 所以没有javac工具,百度查找解决方案后,https://www.bfshu.com/bug/185

进入根目录,输入yum install -y devel即可

cd /

yum install -y java-devel

Centos使用Maven构建项目失败,提示No compiler is provided in this environment. Perhaps you are running

重新输入 javac, 发现这个命令可以找到了

Centos使用Maven构建项目失败,提示No compiler is provided in this environment. Perhaps you are running

再次执行maven命令构建项目

Centos使用Maven构建项目失败,提示No compiler is provided in this environment. Perhaps you are running

构建成功了

Centos使用Maven构建项目失败,提示No compiler is provided in this environment. Perhaps you are running

Centos使用Maven构建项目失败,提示No compiler is provided in this environment. Perhaps you are running

 


上一篇:程序员需要了解依赖冲突的原因以及解决方案


下一篇:依赖冲突的原因以及解决办法