问题
ubuntu中安装了Anaconda,终端用户名前出现(base),如下:
(base) aaa@Kylin:~$
导致执行maven命令时出现:
(base) aaa@Kylin:~$ mvn -V
bash: mvn: 未找到命令
解决
安装完maven、配置完环境变量后,重新加载source /etc/profile
(base) aaa@Kylin:~$ source /etc/profile
此时(base)消失,变成:
aaa@Kylin:~$
然后就能执行mvn命令了。
aaa@Kylin:~$ mvn -V
Apache Maven 3.6.3 (1234456788dfdgfhjdhsdfgs)
Maven home: /opt/apache-maven-3.6.3
Java version: 1.8.0_151, vendor: Oracle Corporation, runtime: /usr/lib/jvm/java-8-openjdk-amd64/jre
Default locale: zh_CN, platform encoding: UTF-8
OS name: "linux", version: "4.11.0-14-generic", arch: "amd64", family: "unix"
网友评论