文章出處
checking for OS
文章列表
查看系統版本
[root@CP-RHEL proc]# cat /etc/issue Red Hat Enterprise Linux Server release 6.0 (Santiago) Kernel \r on an \m
查看系統是否安裝GCC
輸入gcc,提示gcc命令沒找到,說明未安裝
[root@CP-RHEL proc]# gcc -bash: gcc: command not found
準備RPM軟件包
準備rpm軟件包,如下圖所示,可去網上下載,也可以直接從光盤鏡像中拷貝過來;
我的操作系統是裝在虛擬機里,系統鏡像是網上下載的,直接用7z打開iso文件,如下,可以找到以上的rpm軟件包。
開始安裝
將需要的rpm軟件包拷貝到linux操作系統里(可以用文件傳輸工具,或者使用mount掛載到硬盤來安裝也是可以的),依次安裝以下軟件包:
rpm -ivh kernel-headers-2.6.32-71.el6.x86_64.rpm
rpm -ivh glibc-headers-2.12-1.7.el6.x86_64.rpm
rpm -ivh glibc-devel-2.12-1.7.el6.x86_64.rpm
rpm -ivh mpfr-2.4.1-6.el6.x86_64.rpm
rpm -ivh ppl-0.10.2-11.el6.x86_64.rpm
rpm -ivh cpp-4.4.4-13.el6.x86_64.rpm
rpm -ivh binutils-2.20.51.0.2-5.11.el6.x86_64.rpm
rpm -ivh cloog-ppl-0.15.7-1.2.el6.x86_64.rpm
rpm -ivh gcc-4.4.4-13.el6.x86_64.rpm
驗證是否安裝
輸入gcc,提示沒有輸入文件,說明安裝ok
[root@CP-RHEL gcc-install]# gcc gcc: 沒有輸入文件
安裝日志
checking for OS
+ Linux 2.6.32-71.el6.x86_64 x86_64
checking for C compiler ... not found
./configure: error: C compiler cc is not found
[root@CP-RHEL nginx-1.10.2]# ^C
[root@CP-RHEL nginx-1.10.2]#
[root@CP-RHEL nginx-1.10.2]# ls
auto conf html man src
CHANGES configure LICENSE objs
CHANGES.ru contrib Makefile README
[root@CP-RHEL nginx-1.10.2]# cd /usr/local/
[root@CP-RHEL local]# ls
apache-tomcat-7.0.72 lib
apache-tomcat-7.0.72.tar.gz lib64
bin libexec
etc nginx-1.10.2
games nginx-1.10.2.tar.gz
gcc-install sbin
include share
jdk1.7.0_25 src
jdk-7u25-linux-x64.tar.gz 測試
[root@CP-RHEL local]# cd gcc-install/
[root@CP-RHEL gcc-install]# ls
binutils-2.20.51.0.2-5.11.el6.x86_64.rpm
cpp-4.4.4-13.el6.x86_64.rpm
gcc-4.4.4-13.el6.x86_64.rpm
glibc-devel-2.12-1.7.el6.x86_64.rpm
glibc-headers-2.12-1.7.el6.x86_64.rpm
[root@CP-RHEL gcc-install]# rpm -ivh glibc-headers-2.12-1.7.el6.x86_64.rpm
warning: glibc-headers-2.12-1.7.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
error: Failed dependencies:
kernel-headers is needed by glibc-headers-2.12-1.7.el6.x86_64
kernel-headers >= 2.2.1 is needed by glibc-headers-2.12-1.7.el6.x86_64
[root@CP-RHEL gcc-install]# ls
binutils-2.20.51.0.2-5.11.el6.x86_64.rpm glibc-devel-2.12-1.7.el6.x86_64.rpm
cpp-4.4.4-13.el6.x86_64.rpm glibc-headers-2.12-1.7.el6.x86_64.rpm
gcc-4.4.4-13.el6.x86_64.rpm
[root@CP-RHEL gcc-install]# ls
binutils-2.20.51.0.2-5.11.el6.x86_64.rpm glibc-devel-2.12-1.7.el6.x86_64.rpm
cpp-4.4.4-13.el6.x86_64.rpm glibc-headers-2.12-1.7.el6.x86_64.rpm
gcc-4.4.4-13.el6.x86_64.rpm
[root@CP-RHEL gcc-install]# rpm -ivh glibc-headers-2.12-1.7.el6.x86_64.rpm
warning: glibc-headers-2.12-1.7.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
error: Failed dependencies:
kernel-headers is needed by glibc-headers-2.12-1.7.el6.x86_64
kernel-headers >= 2.2.1 is needed by glibc-headers-2.12-1.7.el6.x86_64
[root@CP-RHEL gcc-install]# ls
binutils-2.20.51.0.2-5.11.el6.x86_64.rpm glibc-devel-2.12-1.7.el6.x86_64.rpm
cpp-4.4.4-13.el6.x86_64.rpm glibc-headers-2.12-1.7.el6.x86_64.rpm
gcc-4.4.4-13.el6.x86_64.rpm kernel-headers-2.6.32-71.el6.x86_64.rpm
[root@CP-RHEL gcc-install]# rpm -ivh kernel-headers-2.6.32-71.el6.x86_64.rpm
warning: kernel-headers-2.6.32-71.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Preparing... ########################################### [100%]
1:kernel-headers ########################################### [100%]
[root@CP-RHEL gcc-install]# ls
binutils-2.20.51.0.2-5.11.el6.x86_64.rpm glibc-devel-2.12-1.7.el6.x86_64.rpm
cpp-4.4.4-13.el6.x86_64.rpm glibc-headers-2.12-1.7.el6.x86_64.rpm
gcc-4.4.4-13.el6.x86_64.rpm kernel-headers-2.6.32-71.el6.x86_64.rpm
[root@CP-RHEL gcc-install]# rpm -ivh glibc-devel-2.12-1.7.el6.x86_64.rpm
warning: glibc-devel-2.12-1.7.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
error: Failed dependencies:
glibc-headers is needed by glibc-devel-2.12-1.7.el6.x86_64
glibc-headers = 2.12-1.7.el6 is needed by glibc-devel-2.12-1.7.el6.x86_64
[root@CP-RHEL gcc-install]# rpm -ivh glibc-headers-2.12-1.7.el6.x86_64.rpm
warning: glibc-headers-2.12-1.7.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Preparing... ########################################### [100%]
1:glibc-headers ########################################### [100%]
[root@CP-RHEL gcc-install]# rpm -ivh glibc-devel-2.12-1.7.el6.x86_64.rpm
warning: glibc-devel-2.12-1.7.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Preparing... ########################################### [100%]
1:glibc-devel ########################################### [100%]
[root@CP-RHEL gcc-install]# rpm -ivh cpp-4.4.4-13.el6.x86_64.rpm
warning: cpp-4.4.4-13.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
error: Failed dependencies:
libmpfr.so.1()(64bit) is needed by cpp-4.4.4-13.el6.x86_64
[root@CP-RHEL gcc-install]# ^C
[root@CP-RHEL gcc-install]# ^C
[root@CP-RHEL gcc-install]# ^C
[root@CP-RHEL gcc-install]# ^C
[root@CP-RHEL gcc-install]# ls
binutils-2.20.51.0.2-5.11.el6.x86_64.rpm glibc-headers-2.12-1.7.el6.x86_64.rpm
cpp-4.4.4-13.el6.x86_64.rpm kernel-headers-2.6.32-71.el6.x86_64.rpm
gcc-4.4.4-13.el6.x86_64.rpm mpfr-2.4.1-6.el6.x86_64.rpm
glibc-devel-2.12-1.7.el6.x86_64.rpm ppl-0.10.2-11.el6.x86_64.rpm
[root@CP-RHEL gcc-install]# rpm -ivh mpfr-2.4.1-6.el6.x86_64.rpm
warning: mpfr-2.4.1-6.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Preparing... ########################################### [100%]
1:mpfr ########################################### [100%]
[root@CP-RHEL gcc-install]# rpm -ivh ppl-0.10.2-11.el6.x86_64.rpm
warning: ppl-0.10.2-11.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Preparing... ########################################### [100%]
1:ppl ########################################### [100%]
[root@CP-RHEL gcc-install]# rpm -ivh cpp-4.4.4-13.el6.x86_64.rpm
warning: cpp-4.4.4-13.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Preparing... ########################################### [100%]
1:cpp ########################################### [100%]
[root@CP-RHEL gcc-install]# rpm -ivh binutils-2.20.51.0.2-5.11.el6.x86_64.rpm
warning: binutils-2.20.51.0.2-5.11.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Preparing... ########################################### [100%]
package binutils-2.20.51.0.2-5.11.el6.x86_64 is already installed
[root@CP-RHEL gcc-install]# rpm -ivh gcc-4.4.4-13.el6.x86_64.rpm
warning: gcc-4.4.4-13.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
error: Failed dependencies:
cloog-ppl >= 0.15 is needed by gcc-4.4.4-13.el6.x86_64
[root@CP-RHEL gcc-install]# ^C
[root@CP-RHEL gcc-install]# rpm -ivh cloog-ppl-0.15.7-1.2.el6.x86_64.rpm
warning: cloog-ppl-0.15.7-1.2.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Preparing... ########################################### [100%]
1:cloog-ppl ########################################### [100%]
[root@CP-RHEL gcc-install]# rpm -ivh gcc-4.4.4-13.el6.x86_64.rpm
warning: gcc-4.4.4-13.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Preparing... ########################################### [100%]
1:gcc ########################################### [100%]
[root@CP-RHEL gcc-install]# gcc
gcc: 沒有輸入文件
文章列表
全站熱搜