SUSE11中安装GCC开发环境
安装包下载网站:http://213.174.32.130/sles/distribution/11.0-SP1/repo/disk1/suse/x86_64/
RPM包搜索网址:http://rpm.pbone.net/
linux:~ # cat /etc/issue
Welcome to SUSE Linux Enterprise Server 11SP1 (x86_64) - Kernel \r (\l).
linux:~ # cat /proc/version
Linux version 2.6.32.12-0.7-default(geeko@buildhost) (gcc version 4.3.4 [gcc-4_3-branch revision 152973] (SUSELinux) ) #1 SMP 2010-05-20 11:14:20 +0200
1)挂载ISO镜像文件(需要root权限):
#mkdir /mnt/iso
#mount-o loop -t iso9660 <iso file> /mnt/iso
或者插入光驱挂载:
#mkdir /mnt/cdrom
注:查看CDROM设备名称的方法,一般为/dev/cdrom:
* 执行:$ dmesg |egrep -i --color 'cdrom|dvd|cd/rw|writer'
[ 5.437164] sr0 : scsi3-mmc drive: 24x/24x writerdvd-ram cd/rw xa/form2 cdda tray
[ 5.437307] cdrom: Uniform CD-ROM driverRevision: 3.20
* 执行:$ less/proc/sys/dev/cdrom/info
CD-ROMinformation, Id: cdrom.c 3.20 2003/12/17
drive name: sr0
drive speed: 24
* 执行: lsblk(列出所有块设备)
# mount -t iso9660 /dev/cdrom /mnt/cdrom
2)进入到安装位置:
# cd<cdrom>/suse
依赖关系(安装64位即可,无需安装32位):
- 安装glibc-devel-2.9-13.2.x86_64.rpm
-- 需要linux-kernel-headers-2.6.27-2.22.noarch.rpm
- 安装 gcc-4.3-62.198.x86_64.rpm
-- 需要安装gcc43-4.3.3_20081022-11.18.x86_64.rpm
- 安装glibc-devel-32bit-2.9-13.2.x86_64.rpm
- 安装gcc-32bit-4.3-62.198.x86_64.rpm
-- 需要安装gcc43-32bit-4.3.3_20081022-11.18.x86_64.rpm
--- 需要安装libgomp43-32bit-4.3.3_20081022-11.18.x86_64.rpm
- 安装libstdc++43-devel-4.3.3_20081022-11.18.x86_64.rpm
- 安装gcc-c++-4.3-62.198.x86_64.rpm
-- 需要安装gcc43-c++-4.3.3_20081022-11.18.x86_64.rpm
- 安装libstdc++43-devel-32bit-4.3.3_20081022-11.18.x86_64.rpm
- 安装libstdc++-devel-4.3-62.198.x86_64.rpm
3)安装安装glibc-devel
rpm -ivh noarch/linux-kernel-headers-2.6.32-1.4.13.noarch.rpm
# rpm -ivhglibc-devel-2.11.1-0.17.4.x86_64.rpm
4)安装gcc
# rpm -ivh gcc43-4.3.3_20081022-11.18.x86_64.rpm
# rpm -ivhgcc-4.3-62.198.x86_64.rpm
5)安装g++
# rpm -ivh libstdc++-devel-4.3-62.198.x86_64.rpm
# rpm -ivh libstdc++43-devel-4.3.3_20081022-11.18.x86_64.rpm
# rpm -ivh gcc-c++-4.3-62.198.x86_64.rpm
# rpm -ivh gcc43-c++-4.3.3_20081022-11.18.x86_64.rpm
1)挂载ISO镜像
新建一个目录
mkdir /mnt/iso
将iso文件mount到该目录上:
mount -o loop/data/suse11sp1/64-GM-DVD1.iso /mnt/iso
2)增加zypper安装源
或者 zypper sa file:///mnt/iso/ suse11sp1iso
注:直接挂载 ISO 镜像文件,路径 <iso-path> 自行修改,命令:
# zypper sa iso:///?iso=<iso-path>/SLES-11-SP1-x86_64-DVD1.iso
# zypper refresh 刷新生效, ISO 被识别为 yast 源。
3)显示zypper安装源命令:
zypper repos
zypper lr
4)安装GCC、G++
zypper insallgcc-c++
zyppr install gcc
相关文章推荐:
SUSE 11中安装gcc开发环境
通向自由的绿色之光!―― openSUSE 13.2 发布
openSUSE 13.2 快速体验
本文来自:爱好Linux
本文链接:http://www.ahlinux.com/suse/9387.html