冰块
组别列表不合法解决方法
1 Redhat 6.3 添加删除程序时,报错
2 解决方法
重新用光盘搭建一个yum源
2.1 配置光盘Yum源
2.1.1 确保系统中已经安装了yum相关软件包
[root@GDHLR-GET04-VM yum.repos.d]# rpm -qa |grep yum yum-3.2.29-17.el6.noarch
yum-metadata-parser-1.1.2-16.el6.x86_64 yum-utils-1.1.30-6.el6.noarch
PackageKit-yum-plugin-0.5.8-19.el6.x86_64 yum-rhn-plugin-0.9.1-26.el6.noarch PackageKit-yum-0.5.8-19.el6.x86_64
版本号可能有所不同, 如果缺少, 请自行安装(这些包基本都默认安装了).
冰块
2.1.2
修改yum的配置
[root@GDHLR-GET04-VM yum.repos.d]# pwd /etc/yum.repos.d
修改这个配置文件rhel-source.repo
[root@GDHLR-GET04-VM yum.repos.d]# cat rhel-source.repo [rhel-source]
name=Red Hat Enterprise Linux $releasever - $basearch - Source
baseurl=file:///media/RHEL_6.1\\ x86_64\\ Disc\\ 1/ #“\\”后有空格,光驱挂载到media下面,RHEL_6.1\\ x86_64\\ Disc\\ 1是光盘名字 enabled=1 gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[rhel-source-beta]
name=Red Hat Enterprise Linux $releasever Beta - $basearch - Source
baseurl=ftp://ftp.redhat.com/pub/redhat/linux/beta/$releasever/en/os/SRPMS/ enabled=0 gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-beta,file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
2.1.3 修完之后,直接yum install gcc
如下:
[root@GDHLR-GET04-VM yum.repos.d]# yum install gcc
Loaded plugins: product-id, refresh-packagekit, subscription-manager Updating Red Hat repositories.
rhel-source | kB 00:00 ...
rhel-source/primary_db | 3.1 MB 00:00 ...
4.0
冰块
Setting up Install Process Resolving Dependencies --> Running transaction check
---> Package gcc.x86_64 0:4.4.5-6.el6 will be installed
--> Processing Dependency: cpp = 4.4.5-6.el6 for package: gcc-4.4.5-6.el6.x86_64 --> Processing Dependency: cloog-ppl >= 0.15 for package: gcc-4.4.5-6.el6.x86_64 --> Running transaction check
---> Package cloog-ppl.x86_64 0:0.15.7-1.2.el6 will be installed --> -->
Processing Processing
Dependency: Dependency:
libppl.so.7()(64bit) libppl_c.so.2()(64bit)
for for
package: package:
cloog-ppl-0.15.7-1.2.el6.x86_64 cloog-ppl-0.15.7-1.2.el6.x86_64
---> Package cpp.x86_64 0:4.4.5-6.el6 will be installed
--> Processing Dependency: libmpfr.so.1()(64bit) for package: cpp-4.4.5-6.el6.x86_64 --> Running transaction check
---> Package mpfr.x86_64 0:2.4.1-6.el6 will be installed ---> Package ppl.x86_64 0:0.10.2-11.el6 will be installed --> Finished Dependency Resolution
Dependencies Resolved
====================================================================================================================================
Package Arch Version Repository Size
==================================================================================================================================== Installing:
gcc x86_64 4.4.5-6.el6 rhel-source 10 M
Installing for dependencies:
cloog-ppl x86_64 0.15.7-1.2.el6 rhel-source 93 k
cpp x86_64 4.4.5-6.el6 rhel-source 3.7 M
mpfr x86_64 2.4.1-6.el6 rhel-source 156 k
ppl x86_64 0.10.2-11.el6 rhel-source 1.3 M
Transaction Summary
========================================================
冰块
============================================================================ Install 5 Package(s)
Total download size: 15 M Installed size: 33 M Is this ok [y/N]: y Downloading Packages:
------------------------------------------------------------------------------------------------------------------------------------
Total 22 MB 00:00
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release Importing GPG key 0xFD431D51: Userid : Red Hat, Inc. (release key 2) Package:
redhat-release-workstation-6Workstation-6.1.0.2.el6.x86_64
(@anaconda-RedHatEnterpriseLinux-201105101844.x86_64/6.1) From : /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release Is this ok [y/N]: y
Importing GPG key 0x2FA658E0: Userid : Red Hat, Inc. (auxiliary key) Package:
redhat-release-workstation-6Workstation-6.1.0.2.el6.x86_64
(@anaconda-RedHatEnterpriseLinux-201105101844.x86_64/6.1) From : /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release Is this ok [y/N]: y
Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction
Warning: RPMDB altered outside of yum. Installing Installing Installing Installing /5 Installing
rhel-source/productid | kB 00:00 ...
: 1.7
gcc-4.4.5-6.el6.x86_64 5/5
: : : :
mpfr-2.4.1-6.el6.x86_64 1/5 cpp-4.4.5-6.el6.x86_64 2/5 ppl-0.10.2-11.el6.x86_64 3/5 cloog-ppl-0.15.7-1.2.el6.x86_64 4
MB/s
| 15
冰块
duration: 236(ms)
Installed products updated.
Installed: gcc.x86_64
0:4.4.5-6.el6
Dependency Installed: cloog-ppl.x86_64
Complete!
0:0.15.7-1.2.el6
cpp.x86_64
0:4.4.5-6.el6
mpfr.x86_64
0:2.4.1-6.el6 ppl.x86_64 0:0.10.2-11.el6
3 光盘Yum源配置完成就可以使用添加删除功能了

