環境是:centos 5.6 安裝系統時,可能安裝的是標准的精簡版本,所以沒有選擇軟件依賴包,很多軟件都沒有安裝。
現在需要安裝軟件,安裝軟件時報錯:
make: *** 沒有指明目標並且找不到 makefile。 停止。
原因是因為沒有執行./configure
接下來執行 ./configure 報錯:
[root@localhost pcre-8.40]# ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking for style of include used by make... GNU
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/javaSoft/pcre-8.40':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details
原因是缺少c++編譯器,也可以查看日志得到一些信息,
安裝c++編譯器,
yum install gcc-c++ 注意(有些是yum install g++ 但是5.10 的系統版本一定要用gcc-c++)
==============================================
[root@localhost pcre-8.40]# yum install gcc-c++
已加載插件:fastestmirror, refresh-packagekit, security
設置安裝進程
Loading mirror speeds from cached hostfile
* base: mirrors.tuna.tsinghua.edu.cn
* extras: mirrors.163.com
* updates: mirrors.tuna.tsinghua.edu.cn
解決依賴關系
--> 執行事務檢查
---> Package gcc-c++.x86_64 0:4.4.7-18.el6 will be 安裝
--> 處理依賴關系 libstdc++-devel = 4.4.7-18.el6,它被軟件包 gcc-c++-4.4.7-18.el6.x86_64 需要
--> 處理依賴關系 libstdc++ = 4.4.7-18.el6,它被軟件包 gcc-c++-4.4.7-18.el6.x86_64 需要
--> 處理依賴關系 gcc = 4.4.7-18.el6,它被軟件包 gcc-c++-4.4.7-18.el6.x86_64 需要
--> 處理依賴關系 libmpfr.so.1()(64bit),它被軟件包 gcc-c++-4.4.7-18.el6.x86_64 需要
--> 執行事務檢查
---> Package gcc.x86_64 0:4.4.7-18.el6 will be 安裝
--> 處理依賴關系 libgomp = 4.4.7-18.el6,它被軟件包 gcc-4.4.7-18.el6.x86_64 需要
--> 處理依賴關系 cpp = 4.4.7-18.el6,它被軟件包 gcc-4.4.7-18.el6.x86_64 需要
--> 處理依賴關系 libgcc >= 4.4.7-18.el6,它被軟件包 gcc-4.4.7-18.el6.x86_64 需要
--> 處理依賴關系 cloog-ppl >= 0.15,它被軟件包 gcc-4.4.7-18.el6.x86_64 需要
---> Package libstdc++.x86_64 0:4.4.7-11.el6 will be 升級
---> Package libstdc++.x86_64 0:4.4.7-18.el6 will be an update
---> Package libstdc++-devel.x86_64 0:4.4.7-18.el6 will be 安裝
---> Package mpfr.x86_64 0:2.4.1-6.el6 will be 安裝
--> 執行事務檢查
---> Package cloog-ppl.x86_64 0:0.15.7-1.2.el6 will be 安裝
--> 處理依賴關系 libppl_c.so.2()(64bit),它被軟件包 cloog-ppl-0.15.7-1.2.el6.x86_64 需要
--> 處理依賴關系 libppl.so.7()(64bit),它被軟件包 cloog-ppl-0.15.7-1.2.el6.x86_64 需要
---> Package cpp.x86_64 0:4.4.7-18.el6 will be 安裝
---> Package libgcc.x86_64 0:4.4.7-11.el6 will be 升級
---> Package libgcc.x86_64 0:4.4.7-18.el6 will be an update
---> Package libgomp.x86_64 0:4.4.7-11.el6 will be 升級
---> Package libgomp.x86_64 0:4.4.7-18.el6 will be an update
--> 執行事務檢查
---> Package ppl.x86_64 0:0.10.2-11.el6 will be 安裝
--> 完成依賴關系計算
依賴關系解決
================================================================================
軟件包 架構 版本 倉庫 大小
================================================================================
正在安裝:
gcc-c++ x86_64 4.4.7-18.el6 base 4.7 M
為依賴而安裝:
cloog-ppl x86_64 0.15.7-1.2.el6 base 93 k
cpp x86_64 4.4.7-18.el6 base 3.7 M
gcc x86_64 4.4.7-18.el6 base 10 M
libstdc++-devel x86_64 4.4.7-18.el6 base 1.6 M
mpfr x86_64 2.4.1-6.el6 base 157 k
ppl x86_64 0.10.2-11.el6 base 1.3 M
為依賴而更新:
libgcc x86_64 4.4.7-18.el6 base 103 k
libgomp x86_64 4.4.7-18.el6 base 134 k
libstdc++ x86_64 4.4.7-18.el6 base 295 k
事務概要
================================================================================
Install 7 Package(s)
Upgrade 3 Package(s)
總文件大小:22 M
確定嗎?[y/N]:
總文件大小:22 M
確定嗎?[y/N]:y
下載軟件包:
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
Importing GPG key 0xC105B9DE:
Userid : CentOS-6 Key (CentOS 6 Official Signing Key) <centos-6-key@centos.org>
Package: centos-release-6-6.el6.centos.12.2.x86_64 (@anaconda-CentOS-201410241409.x86_64/6.6)
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
確定嗎?[y/N]:y
運行 rpm_check_debug
執行事務測試
事務測試成功
執行事務
正在升級 : libgcc-4.4.7-18.el6.x86_64 1/13
正在升級 : libstdc++-4.4.7-18.el6.x86_64 2/13
正在安裝 : mpfr-2.4.1-6.el6.x86_64 3/13
正在安裝 : cpp-4.4.7-18.el6.x86_64 4/13
正在安裝 : libstdc++-devel-4.4.7-18.el6.x86_64 5/13
正在安裝 : ppl-0.10.2-11.el6.x86_64 6/13
正在安裝 : cloog-ppl-0.15.7-1.2.el6.x86_64 7/13
正在升級 : libgomp-4.4.7-18.el6.x86_64 8/13
正在安裝 : gcc-4.4.7-18.el6.x86_64 9/13
正在安裝 : gcc-c++-4.4.7-18.el6.x86_64 10/13
清理 : libstdc++-4.4.7-11.el6.x86_64 11/13
清理 : libgcc-4.4.7-11.el6.x86_64 12/13
清理 : libgomp-4.4.7-11.el6.x86_64 13/13
Verifying : libstdc++-devel-4.4.7-18.el6.x86_64 1/13
Verifying : cpp-4.4.7-18.el6.x86_64 2/13
Verifying : libgomp-4.4.7-18.el6.x86_64 3/13
Verifying : mpfr-2.4.1-6.el6.x86_64 4/13
Verifying : libgcc-4.4.7-18.el6.x86_64 5/13
Verifying : gcc-4.4.7-18.el6.x86_64 6/13
Verifying : gcc-c++-4.4.7-18.el6.x86_64 7/13
Verifying : ppl-0.10.2-11.el6.x86_64 8/13
Verifying : cloog-ppl-0.15.7-1.2.el6.x86_64 9/13
Verifying : libstdc++-4.4.7-18.el6.x86_64 10/13
Verifying : libstdc++-4.4.7-11.el6.x86_64 11/13
Verifying : libgomp-4.4.7-11.el6.x86_64 12/13
Verifying : libgcc-4.4.7-11.el6.x86_64 13/13
已安裝:
gcc-c++.x86_64 0:4.4.7-18.el6
作為依賴被安裝:
cloog-ppl.x86_64 0:0.15.7-1.2.el6 cpp.x86_64 0:4.4.7-18.el6 gcc.x86_64 0:4.4.7-18.el6 libstdc++-devel.x86_64 0:4.4.7-18.el6 mpfr.x86_64 0:2.4.1-6.el6
ppl.x86_64 0:0.10.2-11.el6
作為依賴被升級:
libgcc.x86_64 0:4.4.7-18.el6 libgomp.x86_64 0:4.4.7-18.el6 libstdc++.x86_64 0:4.4.7-18.el6
完畢!
[root@localhost pcre-8.40]#
==============================================
這里要注意,安裝過程中有一個Is this ok [y/N]: 這里一定要輸入一個y 否則會出錯:
Is this ok [y/N]: Exiting on user Command
Complete! 雖然完成了,但是還沒有安裝成功,再執行 ./configure 還是報錯。
安裝完后,就可以了。