1. 程式人生 > >Centos6.7 運行 eclipse出錯解決辦法

Centos6.7 運行 eclipse出錯解決辦法

版本 ftw 5.4 ast 得到 res setting eclipse 成功

今天在centos下運行eclipse c++出現來點問題。主要原因是jdk點安裝以及環境變量始終不對。

嘗試在/etc/profile中手動配置,也沒有成功。

做了如下步驟成功解決。

1.查看jdk安裝版本,命令是: rpm -qa | grep jdk,運行結果如下

java-1.8.0-openjdk-1.8.0.144-0.b01.el6_9.x86_64
jdk-9-9-ga.x86_64
java-1.6.0-openjdk-1.6.0.35-1.13.7.1.el6_6.x86_64
java-1.7.0-openjdk-1.7.0.79-2.5.5.4.el6.x86_64
java-1.8.0-openjdk-devel-1.8.0.144-0.b01.el6_9.x86_64

java-1.8.0-openjdk-headless-1.8.0.144-0.b01.el6_9.x86_64

2.刪除版本9和1.6,命令是
yum -y remove jdk-9-9-ga.x86_64
yum -y remove java-1.6.0-openjdk-1.6.0.35-1.13.7.1.el6_6.x86_64
問題得到解決。

安裝1.8點步驟在刪除版本之前就做了,命令如下,這步比較關鍵。免去手動設置環境變量點麻煩.

[[email protected] softwares]# yum install java-1.8.0-openjdk-devel

Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Install Process
Loading mirror speeds from cached hostfile
* base: mirrors.sohu.com
* extras: mirrors.sohu.com
* updates: mirrors.sohu.com
gitlab_gitlab-ce/signature | 836 B 00:00
gitlab_gitlab-ce/signature | 1.0 kB 00:00 ...
gitlab_gitlab-ce-source/signature | 836 B 00:00
gitlab_gitlab-ce-source/signature | 951 B 00:00 ...
Resolving Dependencies
--> Running transaction check
---> Package java-1.8.0-openjdk-devel.x86_64 1:1.8.0.144-0.b01.el6_9 will be installed
--> Processing Dependency: java-1.8.0-openjdk = 1:1.8.0.144-0.b01.el6_9 for package: 1:java-1.8.0-openjdk-devel-1.8.0.144-0.b01.el6_9.x86_64
--> Processing Dependency: libawt_xawt.so(SUNWprivate_1.1)(64bit) for package: 1:java-1.8.0-openjdk-devel-1.8.0.144-0.b01.el6_9.x86_64
--> Processing Dependency: libawt_xawt.so()(64bit) for package: 1:java-1.8.0-openjdk-devel-1.8.0.144-0.b01.el6_9.x86_64
--> Running transaction check
......

Centos6.7 運行 eclipse出錯解決辦法