配置光盘安装的本地yum仓库文件名为mycdromrepo光盘挂载点为mntcdrom。配置完成后:1使用catetcyumreposdmycdromrepo命令查询仓库2使用该yum仓库安装gcc【将上述2条操作命令和执行结果以文本方式粘贴到答题框中】
- 使用cat /etc/yum.repos.d/mycdrom.repo命令查询仓库:
[root@localhost ~]# cat /etc/yum.repos.d/mycdrom.repo [mycdrom] name=My CDROM Repository baseurl=file:///mnt/cdrom enabled=1 gpgcheck=0
2)使用该yum仓库,安装gcc:
[root@localhost ~]# yum install gcc Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile
- base: mirrors.aliyun.com
- extras: mirrors.aliyun.com
- updates: mirrors.aliyun.com Resolving Dependencies --> Running transaction check ---> Package gcc.x86_64 0:4.8.5-44.el7 will be installed --> Processing Dependency: cpp = 4.8.5-44.el7 for package: gcc-4.8.5-44.el7.x86_64 --> Processing Dependency: glibc-devel >= 2.2.90-12 for package: gcc-4.8.5-44.el7.x86_64 --> Processing Dependency: libmpc.so.3()(64bit) for package: gcc-4.8.5-44.el7.x86_64 --> Running transaction check ---> Package cpp.x86_64 0:4.8.5-44.el7 will be installed ---> Package glibc-devel.x86_64 0:2.17-307.el7.1 will be installed --> Processing Dependency: glibc-headers = 2.17-307.el7.1 for package: glibc-devel-2.17-307.el7.1.x86_64 --> Processing Dependency: glibc = 2.17-307.el7.1 for package: glibc-devel-2.17-307.el7.1.x86_64 --> Processing Dependency: glibc-headers for package: glibc-devel-2.17-307.el7.1.x86_64 ---> Package libmpc.x86_64 0:1.0.1-3.el7 will be installed --> Running transaction check ---> Package glibc.x86_64 0:2.17-307.el7.1 will be installed --> Processing Dependency: glibc-common = 2.17-307.el7.1 for package: glibc-2.17-307.el7.1.x86_64 ---> Package glibc-headers.x86_64 0:2.17-307.el7.1 will be installed --> Running transaction check ---> Package glibc-common.x86_64 0:2.17-307.el7.1 will be installed --> Finished Dependency Resolution
Dependencies Resolved
========================================================================================================================================================================= Package Arch Version Repository Size
Installing: gcc x86_64 4.8.5-44.el7 mycdrom 16 M Installing for dependencies: cpp x86_64 4.8.5-44.el7 mycdrom 5.9 M glibc-devel x86_64 2.17-307.el7.1 mycdrom 1.1 M glibc-headers x86_64 2.17-307.el7.1 mycdrom 668 k libmpc x86_64 1.0.1-3.el7 mycdrom 51 k Installing for dependencies: glibc x86_64 2.17-307.el7.1 base 3.6 M glibc-common x86_64 2.17-307.el7.1 base 11 M
Transaction Summary
Install 1 Package (+6 Dependent packages)
Total download size: 38 M
Installed size: 111 M
Is this ok [y/d/N]: y
Downloading packages:
(1/7): libmpc-1.0.1-3.el7.x86_64.rpm | 51 kB 00:00:00
(2/7): gcc-4.8.5-44.el7.x86_64.rpm | 16 MB 00:00:00
(3/7): cpp-4.8.5-44.el7.x86_64.rpm | 5.9 MB 00:00:00
(4/7): glibc-headers-2.17-307.el7.1.x86_64.rpm | 668 kB 00:00:00
(5/7): glibc-devel-2.17-307.el7.1.x86_64.rpm | 1.1 MB 00:00:00
(6/7): glibc-2.17-307.el7.1.x86_64.rpm | 3.6 MB 00:00:00
(7/7): glibc-common-2.17-307.el7.1.x86_64.rpm | 11 MB 00:00:00
Total 22 MB/s | 38 MB 00:00:01
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : glibc-common-2.17-307.el7.1.x86_64 1/7
Installing : glibc-2.17-307.el7.1.x86_64 2/7
Installing : libmpc-1.0.1-3.el7.x86_64 3/7
Installing : glibc-headers-2.17-307.el7.1.x86_64 4/7
Installing : glibc-devel-2.17-307.el7.1.x86_64 5/7
Installing : cpp-4.8.5-44.el7.x86_64 6/7
Installing : gcc-4.8.5-44.el7.x86_64 7/7
Verifying : gcc-4.8.5-44.el7.x86_64 1/7
Verifying : cpp-4.8.5-44.el7.x86_64 2/7
Verifying : glibc-common-2.17-307.el7.1.x86_64 3/7
Verifying : glibc-devel-2.17-307.el7.1.x86_64 4/7
Verifying : glibc-headers-2.17-307.el7.1.x86_64 5/7
Verifying : glibc-2.17-307.el7.1.x86_64 6/7
Verifying : libmpc-1.0.1-3.el7.x86_64 7/7
Installed: gcc.x86_64 0:4.8.5-44.el7
Dependency Installed:
cpp.x86_64 0:4.8.5-44.el7 glibc-devel.x86_64 0:2.17-307.el7.1 glibc-headers.x86_64 0:2.17-307.el7.1
libmpc.x86_64 0:1.0.1-3.el7 glibc.x86_64 0:2.17-307.el7.1 glibc-common.x86_64 0:2.17-307.el7.1
Complete
原文地址: http://www.cveoy.top/t/topic/hJEk 著作权归作者所有。请勿转载和采集!