LINUX下的GCC详细教程,带图片的
发布网友
发布时间:2022-04-20 12:36
我来回答
共5个回答
热心网友
时间:2023-09-11 01:33
1、打开VMware Workstation 10,点击“创建新的虚拟机”按钮,进入创建新的虚拟机界面。
2、选择“自定义(高级)”,点击“下一步”。
3、硬件兼容性选择“Workstation 10.0”,点击“下一步”。
4、选择“稍后安装操作系统”,点击“下一步”。
5、操作系统选择“Linux”,版本选择“Ubuntu”,点击“下一步”。
6、设置虚拟机网络类型,点击“下一步”;接下来可全部按照默认设置,点击下一步直至完成。
7、运行虚拟机,开始安装gcc,安装完成进入系统登录界面。
热心网友
时间:2023-09-11 01:33
使用两个命令安装gcc,gcc-c++:
#yum -y install gcc
#yum -y install gcc-c++
yum会自动查找软件的相关依赖包,自动下载安装。
横线以内为安装过程。
——————————————————————————————————
[root@localhost ~]# yum -y install gcc
Loaded plugins: fastestmirror, rhnplugin, security
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Repository contrib is listed more than once in the configuration
This system is not registered with RHN.
RHN support will be disabled.
Loading mirror speeds from cached hostfile
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package gcc.i386 0:4.1.2-51.el5 set to be updated
--> Processing Dependency: glibc-devel >= 2.2.90-12 for package: gcc
--> Running transaction check
---> Package glibc-devel.i386 0:2.5-65 set to be updated
--> Processing Dependency: glibc-headers = 2.5-65 for package: glibc-devel
--> Processing Dependency: glibc-headers for package: glibc-devel
--> Running transaction check
---> Package glibc-headers.i386 0:2.5-65 set to be updated
--> Processing Dependency: kernel-headers >= 2.2.1 for package: glibc-headers
--> Processing Dependency: kernel-headers for package: glibc-headers
--> Running transaction check
---> Package kernel-headers.i386 0:2.6.18-274.3.1.el5 set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
gcc i386 4.1.2-51.el5 base 5.2 M
Installing for dependencies:
glibc-devel i386 2.5-65 base 2.0 M
glibc-headers i386 2.5-65 base 604 k
kernel-headers i386 2.6.18-274.3.1.el5 updates 1.2 M
Transaction Summary
================================================================================
Install 4 Package(s)
Upgrade 0 Package(s)
Total download size: 9.1 M
Downloading Packages:
(1/4): glibc-headers-2.5-65.i386.rpm | 604 kB 00:06
(2/4): kernel-headers-2.6.18-274.3.1.el5.i386.rpm | 1.2 MB 00:14
(3/4): glibc-devel-2.5-65.i386.rpm | 2.0 MB 00:11
(4/4): gcc-4.1.2-51.el5.i386.rpm | 5.2 MB 00:27
--------------------------------------------------------------------------------
Total 149 kB/s | 9.1 MB 01:02
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : kernel-headers 1/4
Installing : glibc-headers 2/4
Installing : glibc-devel 3/4
Installing : gcc 4/4
Installed:
gcc.i386 0:4.1.2-51.el5
Dependency Installed:
glibc-devel.i386 0:2.5-65 glibc-headers.i386 0:2.5-65
kernel-headers.i386 0:2.6.18-274.3.1.el5
Complete!
[root@localhost ~]#
————————————————————————————————————
热心网友
时间:2023-09-11 01:33
先让虚拟机中的linux能上网,只要你主机能上网,把虚拟机的网卡模式设置为桥接模式,就可以了
然后在运行yum install gcc -y,(你的linux版本挺老的,估计够呛能有yum)那就得手动安装
wget ftp://rpmfind.net/linux/freshrpms/redhat/9/yum/yum-2.0.4-1.rh.fr.i386.rpm
rpm -ivh yum-2.0.4-1.rh.fr.i386.rpm
yum update
然后再运行
yum install gcc -y
热心网友
时间:2023-09-11 01:34
先装gcc,因为安装vm tools需要gcc编译模块;
在物理机下载了gcc把他做成iso,完后挂载到虚拟机里面安装(gcc这种基本软件通常在系统光盘里面有,不用下载,光盘Packet文件夹里面,就是你装系统时候的那个iso);
安装gcc的时候可能需要很多依赖哦!
热心网友
时间:2023-09-11 01:35
说明白 Linux 的发行版及版本号.内核版本.vmware 版本.
有问题直接Hi我.追问
如图