Description of problem: Can't install gcc Version-Release number of selected component (if applicable): 4.1.2-14.el5 How reproducible: every time Steps to Reproduce: 1. yum install gcc 2. 3. Actual results: Failure of rpm install of package, with "error: unpacking of archive failed on file /usr/libexec/gcc/x86_64-redhat-linux/4.1.2: cpio: rename failed - Is a directory" Expected results: install of cpp dep succeeds, then gcc Additional info: Workstation upgraded from 4.6 Upgrade failed to complete due to this bug (see 428453 and 432773) and system is useable, except I can't install gcc, cpp, gfortran etc. Resolution of 432773 as CANTFIX is no help to me, as it relates to the install process - what can be done on the system post install?
Try rpm -e gcc4 gcc4-c++ gcc4-java gcc4-gfortran libgcj4-devel libgcj4-src libmudflap-devel first.
Created attachment 296756 [details] complete list of installed packages
Created attachment 296757 [details] all rpms, ordered by install time
Clearing out the old RPMs was the first thing I did after the partially successful upgrade. I've attached a list of installed packages, and one of all rpms ordered by install time. This is why it's a problem - even with the system having only RHEL5.1 rpms installed, I still get [root@pineapples ~]# rpm -ivh /home/atg/downloads/RHEL4/cpp-4.1.2-14.el5.x86_64.rpm Preparing... ########################################### [100%] 1:cpp ########################################### [100%] error: unpacking of archive failed on file /usr/libexec/gcc/x86_64-redhat-linux/4.1.2: cpio: rename failed - Is a directory
If you have successfully uninstalled all gcc4* packages (and their lib* subpackages), then the /usr/libexec/gcc/x86_64-redhat-linux/4.1.2 directory should be gone too and so installing the RHEL5.1/5.2 gcc should work just fine. If the uninstallation wasn't successful, then you can manually mv /usr/libexec/gcc/x86_64-redhat-linux/4.1.2{,.bak} and then RHEL5.x gcc should install properly.
But it does not, that's my point: [root@pineapples ~]# ls -l /usr/libexec/gcc/x86_64-redhat-linux/ total 12 drwxr-xr-x 2 root root 4096 Feb 20 11:04 3.4.3 lrwxrwxrwx 1 root root 5 Jan 24 11:39 3.4.6 -> 3.4.3 [root@pineapples ~]# yum install gcc Loading "installonlyn" plugin Loading "rhnplugin" plugin Loading "changelog" plugin Loading "downloadonly" plugin Loading "kmod" plugin Loading "security" plugin Setting up Install Process Setting up repositories rhel-x86_64-client-supple 100% |=========================| 1.4 kB 00:00 rhel-x86_64-client-workst 100% |=========================| 1.4 kB 00:00 rhel-x86_64-client-5 100% |=========================| 1.4 kB 00:00 rhel-x86_64-client-vt-5 100% |=========================| 1.4 kB 00:00 Reading repository metadata in from local files Parsing package install arguments Resolving Dependencies --> Populating transaction set with selected packages. Please wait. ---> Downloading header for gcc to pack into transaction set. gcc-4.1.2-14.el5.x86_64.r 100% |=========================| 66 kB 00:00 ---> Package gcc.x86_64 0:4.1.2-14.el5 set to be updated --> Running transaction check --> Processing Dependency: cpp = 4.1.2-14.el5 for package: gcc --> Restarting Dependency Resolution with new changes. --> Populating transaction set with selected packages. Please wait. ---> Package cpp.x86_64 0:4.1.2-14.el5 set to be updated --> Running transaction check Dependencies Resolved ============================================================================= Package Arch Version Repository Size ============================================================================= Installing: gcc x86_64 4.1.2-14.el5 rhel-x86_64-client-5 5.3 M Installing for dependencies: cpp x86_64 4.1.2-14.el5 rhel-x86_64-client-5 2.9 M Transaction Summary ============================================================================= Install 2 Package(s) Update 0 Package(s) Remove 0 Package(s) Total download size: 8.2 M Is this ok [y/N]: y Downloading Packages: (1/2): gcc-4.1.2-14.el5.x 100% |=========================| 5.3 MB 00:06 (2/2): cpp-4.1.2-14.el5.x 100% |=========================| 2.9 MB 00:03 Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Installing: cpp ######################### [1/2] Installing: gcc ######################### [2/2] error: unpacking of archive failed on file /usr/lib/gcc/x86_64-redhat-linux/4.1.2: cpio: rename Installed: gcc.x86_64 0:4.1.2-14.el5 Dependency Installed: cpp.x86_64 0:4.1.2-14.el5 Complete! [root@pineapples ~]# rpm -q gcc package gcc is not installed [root@pineapples ~]# ls -l /usr/libexec/gcc/x86_64-redhat-linux/ total 24 drwxr-xr-x 2 root root 4096 Feb 20 11:04 3.4.3 lrwxrwxrwx 1 root root 5 Jan 24 11:39 3.4.6 -> 3.4.3 drwxr-xr-x 2 root root 4096 Mar 11 09:44 4.1.1 lrwxrwxrwx 1 root root 5 Mar 11 09:44 4.1.2 -> 4.1.1 [root@pineapples ~]# rpm -ivh /home/atg/downloads/RHEL4/gcc-4.1.2-14.el5.x86_64.rpm Preparing... ########################################### [100%] 1:gcc ########################################### [100%] error: unpacking of archive failed on file /usr/lib/gcc/x86_64-redhat-linux/4.1.2: cpio: rename failed - Is a directory [root@pineapples ~]# ls -l /usr/libexec/gcc/x86_64-redhat-linux/ total 24 drwxr-xr-x 2 root root 4096 Feb 20 11:04 3.4.3 lrwxrwxrwx 1 root root 5 Jan 24 11:39 3.4.6 -> 3.4.3 drwxr-xr-x 2 root root 4096 Mar 11 09:44 4.1.1 lrwxrwxrwx 1 root root 5 Mar 11 09:44 4.1.2 -> 4.1.1 [root@pineapples ~]#
Please refer to BZ 432773, comment #32: When upgrading to Red Hat Enterprise Linux 5.1 or newer from Red Hat Enterprise Linux 4.6, gcc4 may cause the upgrade to fail. As such, you should manually remove the gcc4 package before upgrading.