6-源代码编译安装——搭建环境
2016.6.4
使用RPM安装GCC
挂载光驱
[root@test1 test]# mount /dev/cdrom /mnt
mount: block device /dev/sr0 is write-protected, mounting read-only
mount: /dev/sr0 already mounted or /mnt busy
mount: according to mtab, /dev/sr0 is already mounted on /mnt
[root@test1 test]# cd /mnt/Packages/
[root@test1 Packages]#
安装支持gcc的RPM包
ppl-0.10.2.-11.el6.x86_64.rpm
[root@test1 Packages]# 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 c105b9de: NOKEY
Preparing... ########################################### [100%]
1:ppl ########################################### [100%]
- ppl rpm build for : Scientific Linux 6.
Name : ppl
Version : 0.10.2 Vendor : Scientific Linux
Release : 11.el6 Date : 2010-11-24 03:35:50
Group : Development/Libraries Source RPM : ppl-0.10.2-11.el6.src.rpm
Size : 4.42 MB
Packager : Koji
Summary : The Parma Polyhedra Library: a library of numerical abstractions
- Description :
The Parma Polyhedra Library (PPL) is a library for the manipulation of
(not necessarily closed) convex polyhedra and other numerical
abstractions. The applications of convex polyhedra include program
analysis, optimized compilation, integer and combinatorial
optimization and statistical data-editing. The Parma Polyhedra
Library comes with several user friendly interfaces, is fully dynamic
(available virtual memory is the only limitation to the dimension of
anything), written in accordance to all the applicable standards,
exception-safe, rather efficient, thoroughly documented, and free
software. This package provides all what is necessary to run
applications using the PPL through its C and C++ interfaces.
RPM found in directory: /mirror/ftp.scientificlinux.org/linux/scientific/6rolling/x86_64/os/Packages
- Provides :
libppl.so.7()(64bit)
libppl_c.so.2()(64bit)
ppl
ppl(x86-64)
cloog-ppl-0.15.7-1.2.el6.x86_64.rpm
[root@test1 Packages]# rpm -ivh cloog-ppl-0.15.7-1.2.el6.
error: open of cloog-ppl-0.15.7-1.2.el6. failed: No such file or directory
[root@test1 Packages]# 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 c105b9de: NOKEY
Preparing... ########################################### [100%]
1:cloog-ppl ########################################### [100%]
- cloog-ppl rpm build for : Scientific Linux 6.
Name : cloog-ppl
Version : 0.15.7 Vendor : Scientific Linux
Release : 1.2.el6 Date : 2010-11-23 01:54:26
Group : Development/Libraries Source RPM : cloog-0.15.7-1.2.el6.src.rpm
Size : 0.18 MB
Packager : Koji
Summary : Parma Polyhedra Library backend (ppl) based version of the Cloog binaries
- Description :
The dynamic shared libraries of the Chunky Loop Generator
RPM found in directory: /mirror/ftp.scientificlinux.org/linux/scientific/6.1/x86_64/os/Packages
- Provides :
libcloog.so.0()(64bit)
cloog-ppl
cloog-ppl(x86-64)
mpfr-2.4.1-6.el6.x86_64.rpm
[root@test1 Packages]# rpm -ivh mpfr-
mpfr-2.4.1-6.el6.i686.rpm mpfr-devel-2.4.1-6.el6.i686.rpm
mpfr-2.4.1-6.el6.x86_64.rpm mpfr-devel-2.4.1-6.el6.x86_64.rpm
[root@test1 Packages]# 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 c105b9de: NOKEY
Preparing... ########################################### [100%]
1:mpfr ########################################### [100%]
- mpfr rpm build for : Scientific Linux 6.
Name : mpfr
Version : 2.4.1 Vendor : Scientific Linux
Release : 6.el6 Date : 2010-11-23 20:52:55
Group : System Environment/Libraries Source RPM : mpfr-2.4.1-6.el6.src.rpm
Size : 0.36 MB
Packager : Koji
Summary : A C library for multiple-precision floating-point computations
- Description :
The MPFR library is a C library for multiple-precision floating-point
computations with \"correct rounding\". The MPFR is efficient and
also has a well-defined semantics. It copies the good ideas from the
ANSI/IEEE-754 standard for double-precision floating-point arithmetic
(53-bit mantissa). MPFR is based on the GMP multiple-precision library.
RPM found in directory: /mirror/ftp.scientificlinux.org/linux/scientific/6rolling/x86_64/os/Packages
- Provides :
libmpfr.so.1()(64bit)
mpfr
mpfr(x86-64)
cpp-4.4.7-4.el6.x86_64.rpm
[root@test1 Packages]# rpm -ivh cpp-4.4.7-4.el6.x86_64.rpm
warning: cpp-4.4.7-4.el6.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
Preparing... ########################################### [100%]
1:cpp ########################################### [100%]
- cpp rpm build for : Scientific Linux 6.
Name : cpp
Version : 4.4.7 Vendor : Scientific Linux
Release : 4.el6 Date : 2013-11-22 17:18:12
Group : Development/Languages Source RPM : gcc-4.4.7-4.el6.src.rpm
Size : 9.54 MB
Packager : Scientific Linux
Summary : The C Preprocessor.
- Description :
Cpp is the GNU C-Compatible Compiler Preprocessor.
Cpp is a macro processor which is used automatically
by the C compiler to transform your program before actual
compilation. It is called a macro processor because it allows
you to define macros, abbreviations for longer
constructs.
The C preprocessor provides four separate functionalities: the
inclusion of header files (files of declarations that can be
substituted into your program); macro expansion (you can define macros,
and the C preprocessor will replace the macros with their definitions
throughout the program); conditional compilation (using special
preprocessing directives, you can include or exclude parts of the
program according to various conditions); and line control (if you use
a program to combine or rearrange source files into an intermediate
file which is then compiled, you can use line control to inform the
compiler about where each source line originated).
You should install this package if you are a C programmer and you use
macros.
RPM found in directory: /mirror/ftp.scientificlinux.org/linux/scientific/6.5/x86_64/os/Packages
- Provides :
cpp
cpp
cpp(x86-64)
gcc-4.4.7-4.el6.x86_64.rpm
[root@test1 Packages]# rpm -ivh gcc-4.4.7-4.el6.x86_64.rpm
warning: gcc-4.4.7-4.el6.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
Preparing... ########################################### [100%]
1:gcc ########################################### [100%]
- gcc rpm build for : Scientific Linux 6.
Name : gcc
Version : 4.4.7 Vendor : Scientific Linux
Release : 4.el6 Date : 2013-11-22 17:18:12
Group : Development/Languages Source RPM : gcc-4.4.7-4.el6.src.rpm
Size : 18.51 MB
Packager : Scientific Linux
Summary : Various compilers (C, C++, Objective-C, Java, ...)
- Description :
The gcc package contains the GNU Compiler Collection version 4.1.
You\'ll need this package in order to compile C code.
RPM found in directory: /mirror/ftp.scientificlinux.org/linux/scientific/6.5/x86_64/os/Packages
- Provides :
gcc
gcc
gcc(x86-64)
libstdc++-devel-4.4.7-4.el6.x86_64.rpm
[root@test1 Packages]# rpm -ivh libstdc++-
libstdc++-4.4.7-4.el6.i686.rpm libstdc++-devel-4.4.7-4.el6.x86_64.rpm
libstdc++-4.4.7-4.el6.x86_64.rpm libstdc++-docs-4.4.7-4.el6.x86_64.rpm
libstdc++-devel-4.4.7-4.el6.i686.rpm
[root@test1 Packages]# rpm -ivh libstdc++-devel-4.4.7-4.el6.x86_64.rpm
warning: libstdc++-devel-4.4.7-4.el6.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
Preparing... ########################################### [100%]
1:libstdc++-devel ########################################### [100%]
gcc-c++-4.4.7-4.el6.x86_64.rpm
[root@test1 Packages]# rpm -ivh gcc-c++-4.4.7-4.el6.x86_64.rpm
warning: gcc-c++-4.4.7-4.el6.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
Preparing... ########################################### [100%]
1:gcc-c++ ########################################### [100%]
[root@test1 Packages]#
- gcc-c++ rpm build for : Scientific Linux 6.
Name : gcc-c++
Version : 4.4.7 Vendor : Scientific Linux
Release : 4.el6 Date : 2013-11-22 17:18:12
Group : Development/Languages Source RPM : gcc-4.4.7-4.el6.src.rpm
Size : 10.89 MB
Packager : Scientific Linux
Summary : C++ support for GCC
- Description :
This package adds C++ support to the GNU Compiler Collection.
It includes support for most of the current C++ specification,
including templates and exception handling.
RPM found in directory: /mirror/ftp.scientificlinux.org/linux/scientific/6.5/x86_64/os/Packages
- Provides :
gcc-c++
gcc-c++
gcc-c++(x86-64)
再次查看gcc信息及安装情况
- gcc --version
[root@test1 Packages]# gcc --version
gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-4)
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
[root@test1 Packages]#
- rpm -qa | grep gcc
[root@test1 Packages]# rpm -qa | grep gcc
gcc-c++-4.4.7-4.el6.x86_64
gcc-4.4.7-4.el6.x86_64
libgcc-4.4.7-4.el6.x86_64
[root@test1 Packages]#
自我测试
尝试在看上面知识情况下,熟练的搭建环境