libstdc++6 conflict

Hey there,

The office workstation suddenly starting having issues. That is, zypper won’t work and posts the error

zypper: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory

We can’t seem to find libstdc++ installed anywhere, so we figured we’d put it back on the system by running

rpm -Uvh http://download.opensuse.org/repositories/openSUSE:/13.1/standard/x86_64/libstdc++6-4.8.1_20130909-3.2.1.x86_64.rpm
rpm -Uvh http://download.opensuse.org/repositories/openSUSE:/13.1/standard/i586/libstdc++6-4.8.1_20130909-3.2.1.i586.rpm

(one for 32-bit and one for 64-bit). But we then get an error stating that there is a conflict between libstdc++6 and libstdc++6-4.8.1_20130909. But we cannot find any libstdc++6 still on the system. Is there a cache somewhere that still thinks it exists when it really doesn’t?

Thank you in advance for any help.

The file is
libstdc++6

I have

rpm -qi libstdc++6Name        : libstdc++6
Version     : 4.8.1_20130909
Release     : 3.2.1
Architecture: x86_64
Install Date: Wed 06 Nov 2013 19:58:30 GMT
Group       : System/Libraries
Size        : 995512
License     : GPL-3.0-with-GCC-exception
Signature   : RSA/SHA256, Fri 04 Oct 2013 08:49:58 BST, Key ID b88b2fd43dbdc284
Source RPM  : gcc48-4.8.1_20130909-3.2.1.src.rpm
Build Date  : Fri 04 Oct 2013 08:24:39 BST
Build Host  : build10
Relocations : (not relocatable)
Packager    : http://bugs.opensuse.org
Vendor      : openSUSE
URL         : http://gcc.gnu.org/
Summary     : The standard C++ shared library
Description :
The standard C++ library, needed for dynamically linked C++ programs.
Distribution: openSUSE 13.1



Perhaps we should see what your repos are like

zypper lr -d

You are missing a symbolic link:

:~> l  /usr/lib64/libstdc++*
lrwxrwxrwx 1 root root   19 Nov  6 19:58 /usr/lib64/libstdc++.so.6 -> libstdc++.so.6.0.18*
-rwxr-xr-x 1 root root 973K Oct  4  2013 /usr/lib64/libstdc++.so.6.0.18*

But this may be due to a missing package. This is what I get:

:~> rpm -qa libstdc*
libstdc++6-4.8.1_20130909-3.2.1.x86_64

What do you get?

We can’t seem to find libstdc++ installed anywhere, so we figured we’d put it back on the system by running

rpm -Uvh http://download.opensuse.org/repositories/openSUSE:/13.1/standard/x86_64/libstdc++6-4.8.1_20130909-3.2.1.x86_64.rpm
rpm -Uvh http://download.opensuse.org/repositories/openSUSE:/13.1/standard/i586/libstdc++6-4.8.1_20130909-3.2.1.i586.rpm

You cannot mix i586 and 86_64 packages. Choose acording to the system architecture. You only need the 32bit packages if you are running a dependent 32bit program; normally this is only needed for grub etc. If you have the correct repositories installed just

# zypper install  libstdc++6  libstdc++6-32bit

YaST Software Manager makes this much easier for checking and fixing problems. Zypper is ideal for bulk stuff and putting in scripts. If your rpm database is damaged and misreports, you can rebuild it with:

#  rpm --rebuilddb

Thanks for the reply. However, I cannot use zypper, when we try, we get the message


zypper: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory

Thanks for the reply. I get

:~> rpm -qa libstdc*rpm: No match.

Thanks, the only reason we were trying to install both is that both /usr/lib/ and /usr/lib64/ contained libstdc++6. Now they are both gone.

Zypper is non-functional without the libstdc++6. Will rebuilding the rpm database allow for the rpm install of libstdc++6?

That’s why there’s libstdc++6-32bit. To make it possible to install the 32bit and the 64bit version at the same time.

Zypper is non-functional without the libstdc++6. Will rebuilding the rpm database allow for the rpm install of libstdc++6?

I don’t think that your rpm database is corrupt.
Probably you just removed the file somehow, but the package is still installed.
Trying to uninstall libstdc++6 would remove a lot of other packages as well as a consequence.
On my system, this happens:

# zypper rm libstdc++6
Loading repository data...
Reading installed packages...
Resolving package dependencies...

The following 4574 packages are going to be REMOVED:
...

The following product is going to be REMOVED:
  openSUSE 

The following 5 packages are going to be downgraded:
  libquicktime0 libquvi-scripts libtirpc1 mlocate-lang ucode-amd 

The following package is going to change architecture:
  mlocate-lang  noarch -> x86_64

The following package is going to change vendor:
  libquicktime0  http://packman.links2linux.de -> openSUSE

5 packages to downgrade, 4574 to remove, 1 to change vendor, 1 to change arch.
Overall download size: 468.7 KiB. After the operation, 12.8 GiB will be freed.
Continue? [y/n/p/? shows all options] (y):

So you cannot really uninstall it, especially not by mistake. :wink:

You should instead try to specify the “–nodeps” and “–replacepkgs” switches to rpm. It should then get installed, and zypper should work again.

rpm -Uvh --nodeps --replacepkgs http://download.opensuse.org/repositories/openSUSE:/13.1/standard/x86_64/libstdc++6-4.8.1_20130909-3.2.1.x86_64.rpm

I have just removed and replaced libstdc++6 on a test system. This is what happened:


valeria:~ # rpm -e --nodeps libstdc++6
/sbin/ldconfig: /lib64/libselinux.so.1 is not a symbolic link

valeria:~ # zypper lr
zypper: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
valeria:~ # 
valeria:~ # rpm -qa libstdc*
libstdc++6-32bit-4.8.1_20130909-3.2.1.x86_64
valeria:~ # 
valeria:~ # rpm -Uvh --nodeps --replacepkgs http://download.opensuse.org/repositories/openSUSE:/13.1/standard/x86_64/libstdc++6-4.8.1_20130909-3.2.1.x86_64.rpm
Retrieving http://download.opensuse.org/repositories/openSUSE:/13.1/standard/x86_64/libstdc++6-4.8.1_20130909-3.2.1.x86_64.rpm
Preparing...                          ################################# [100%]
Updating / installing...
   1:libstdc++6-4.8.1_20130909-3.2.1  ################################# [100%]
/sbin/ldconfig: /lib64/libselinux.so.1 is not a symbolic link

valeria:~ # rpm -qa libstdc*
libstdc++6-32bit-4.8.1_20130909-3.2.1.x86_64
libstdc++6-4.8.1_20130909-3.2.1.x86_64
valeria:~ # 
valeria:~ # zypper info libstdc++6
Loading repository data...
Reading installed packages...


Information for package libstdc++6:
-----------------------------------
Repository: 13.1-repo-oss
Name: libstdc++6
Version: 4.8.1_20130909-3.2.1
Arch: x86_64
Vendor: openSUSE
Installed: Yes
Status: up-to-date
Installed Size: 972.2 KiB
Summary: The standard C++ shared library
Description: 
The standard C++ library, needed for dynamically linked C++ programs.
valeria:~ # 

I am not sure that rpm rebuilddb would be useful; but it should not do any harm, and may help. You will also need to install
http://download.opensuse.org/distribution/13.1/repo/oss/suse/x86_64/libstdc++6-32bit-4.8.1_20130909-3.2.1.x86_64.rpm

Thank you guys for all your help and patience. Running the command

rpm -Uvh --nodeps --replacepkgs http://download.opensuse.org/repositories/openSUSE:/13.1/standard/x86_64/libstdc++6-4.8.1_20130909-3.2.1.x86_64.rpm

yields this error message

Retrieving http://download.opensuse.org/repositories/openSUSE:/13.1/standard/x86_64/libstdc++6-4.8.1_20130909-3.2.1.x86_64.rpmPreparing...                ########################################### [100%]
	file /usr/lib64/libstdc++.so.6 from install of libstdc++6-4.8.1_20130909-3.2.1.x86_64 conflicts with file from package libstdc++44-4.4.1_20090817-2.3.4.x86_64

I am unsure of what to make of this.

Add “–replacefiles” as well then:

rpm -Uvh --nodeps --replacepkgs --replacefiles http://download.opensuse.org/repositories/openSUSE:/13.1/standard/x86_64/libstdc++6-4.8.1_20130909-3.2.1.x86_64.rpm

And btw, apparently you have libstdc++44-4.4.1_20090817 installed which causes the problem (maybe even all of them). Try to uninstall it first (with “rpm -e --nodeps libstdc++44”). Where do you even have that from?
I can’t find this in openSUSE 13.1 at all.

Possibly openSuSE-11.2, I do not know about 11.3, but 11.4 was definitely only libstdc++33 and libstdc++45, and 11.2 was .libstdc++43.

The reference to libstdc++44, but not being reported by rpm -q was what made me suggest* rebuilddb.*

Hm, I don’t see any reference to libstc++44 anywhere in this thread except for that previous post…

But something is fishy here anyway.
A package called libstdc++44 should not contain a file named /usr/lib64/libstdc++.so.6.

But maybe “rpm -qa | grep libstdc” would give a proper result? (maybe the * was expanded by the shell) :wink:

On 2014-04-15 18:56, nmearl wrote:
>
> caf4926;2637022 Wrote:
>>
>> Perhaps we should see what your repos are like

> Thanks for the reply. However, I cannot use zypper, when we try, we get
> the message
>
>
> Code:
> --------------------
> zypper: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
> --------------------

try this instead:


grep "name\|enabled\|baseurl" /etc/zypp/repos.d/*

And also:


cat /etc/SuSE-release


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

Yes, I was/am mentally confused!

But something is fishy here anyway.
A package called libstdc++44 should not contain a file named /usr/lib64/libstdc++.so.6.

Well (I still have a running 11.4) * libstdc++45* definitely contains * /usr/lib64/libstdc++.so.6.0.14* which links to* /usr/lib64/libstdc++.so.6*.
And libstdc++33 contains * /usr/lib64/libstdc++.so.5*

But maybe “rpm -qa | grep libstdc” would give a proper result? (maybe the * was expanded by the shell) :wink:

From openSuSE-11.4

sysman@chelsea:~> rpm -qa | grep libstdc
libstdc++33-3.3.3-27.4.x86_64
libstdc++45-4.5.1_20101208-9.8.x86_64
sysman@chelsea:~> rpm -qa  libstdc*
libstdc++33-3.3.3-27.4.x86_64
libstdc++45-4.5.1_20101208-9.8.x86_64

Ok, so they didn’t quite follow the openSUSE shared library packaging policy back then, it seems… :wink:

Nowadays the package is (has to be) named libstdc++6, because it contains libstdc++.so.6.
The devel packages is called libstdc++48-devel though, as it contains the devel files for libstdc++(6) version 4.8.

Anyway, the OP should definitely uninstall that old libstdc++44 then:

sudo rpm -e libstdc++44

And then install libstdc++6 as also mentioned earlier already.

Thanks for everything; you guys are very knowledgable.

After using

rpm -Uvh --nodeps --replacepkgs --replacefiles http://download.opensuse.org/repositories/openSUSE:/13.1/standard/x86_64/libstdc++6-4.8.1_20130909-3.2.1.x86_64.rpm

No error message occurred, but trying out zypper again yielded

zypper: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /usr/lib64/libstdc++.so.6)

However, we have not yet done a

sudo rpm -e libstdc++44

yet, so perhaps that could still cause the issue?

No, you overwrote its files with the newer version. This is not nice, but should work for now.

Better uninstall it though, and reinstall the correct libstdc++:

sudo rpm -e --nodeps libstdc++44
sudo rpm -Uvh --nodeps --replacepkgs --replacefiles http://download.opensuse.org/repositories/openSUSE:/13.1/standard/x86_64/libstdc++6-4.8.1_20130909-3.2.1.x86_64.rpm

(although --replacefiles should not be necessary in this case, but it cannot harm either)

According to the error message, you also seem to have a wrong glibc installed.
Please post the output of:

rpm -qi glibc
rpm -V glibc

Here is the output after running your commands

sudo rpm -e --nodeps libstdc++44

sudo rpm -Uvh --nodeps --replacepkgs --replacefiles http://download.opensuse.org/repositories/openSUSE:/13.1/standard/x86_64/libstdc++6-4.8.1_20130909-3.2.1.x86_64.rpm 
Retrieving http://download.opensuse.org/repositories/openSUSE:/13.1/standard/x86_64/libstdc++6-4.8.1_20130909-3.2.1.x86_64.rpm
Preparing...                ########################################### [100%]
   1:libstdc++6             ########################################### [100%]




rpm -qi glibc
Name        : glibc                        Relocations: (not relocatable)
Version     : 2.10.1                            Vendor: openSUSE
Release     : 10.9.1                        Build Date: Wed 27 Oct 2010 12:37:41 AM PDT
Install Date: Mon 14 Apr 2014 02:19:55 PM PDT      Build Host: build31
Group       : System/Libraries              Source RPM: glibc-2.10.1-10.9.1.src.rpm
Size        : 4700976                          License: GPLv2+
Signature   : RSA/8, Wed 27 Oct 2010 12:39:44 AM PDT, Key ID b88b2fd43dbdc284
Packager    : http://bugs.opensuse.org
URL         : http://www.gnu.org/software/libc/libc.html
Summary     : Standard Shared Libraries (from the GNU C Library)
Description :
The GNU C Library provides the most important standard libraries used
by nearly all programs: the standard C library, the standard math
library, and the POSIX thread library. A system is not functional
without these libraries.
Distribution: openSUSE 11.2




rpm -V glibc
..?......    /usr/sbin/glibc_post_upgrade

So you still have glibc from openSUSE 11.2 installed.
Did you install that yourself?

You write in the OP that “The office workstation suddenly starting having issues.”
Which openSUSE version do/did you actually have installed when the issues started?
I somehow have the suspicion that you actually ran 11.2, so it was rather a bad idea to install the 13.1 version of libstdc++6 then.

If you are indeed running 13.1, then install the correct glibc like this:

sudo rpm -Uvh http://download.opensuse.org/distribution/13.1/repo/oss/suse/x86_64/glibc-2.18-4.4.1.x86_64.rpm

But in that case I’d wonder where all those outdated packages come from.
Apparently you installed that 11.2 glibc on Mon 14 Apr 2014, but how and why?

No, I do not have sudo access. It’s a computer owned by the department that I’ve been given permission to use, but it’s clearly not in a useable state. I was told that the workstation had been experiencing issues and have been left to try to figure it out myself. This is due in part because the department system admin has left and has not been replaced. A colleague has sudo access for whatever reason. I’ve been using him to try and get this sorted out.

From the command line, it shows the system is 13.1

:~> cat /etc/os-release
NAME=openSUSE
VERSION="13.1 (Bottle)"
VERSION_ID="13.1"
PRETTY_NAME="openSUSE 13.1 (Bottle) (x86_64)"
ID=opensuse
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:opensuse:opensuse:13.1"
BUG_REPORT_URL="https://bugs.opensuse.org"
HOME_URL="https://opensuse.org/"
ID_LIKE="suse"

But I’m told that before the libstdc++ issue, there were (and are still, presumably) both 11.2 and 13.1 repositories linked in zypper.

I can’t really answer this. But I’m considering that it’d just be best to have the other department’s system admin wipe the system and reinstall the latest OpenSUSE?

Thanks again for your time.

It sounds like it might have been 11.2 originally perhaps
Maybe it has been through a series of ‘upgrades’
Who knows

The likelihood that anyone in your organisation is skilled enough to call themselves a Linux System Admin, given what we already know, seems most unlikely.

At the machine doesn’t sound like it’s mission critical
So starting again is an obvious option.