LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (https://www.linuxquestions.org/questions/fedora-35/)
-   -   How do you tell yum a lib is installed? (https://www.linuxquestions.org/questions/fedora-35/how-do-you-tell-yum-a-lib-is-installed-623617/)

terry-duell 02-25-2008 12:19 AM

How do you tell yum a lib is installed?
 
I have a recent fresh install of Fedora 8, and have only added any software via the package manager.
I have just tried to do a 'yum localinstall...' of an rpm and am told that there is a missing dependency, libstdc++.so.6.
I quick snoop in /usr/lib shows that I have libstdc++.so.6.0.8 and a link libstdc++.so.6 which points to libstdc++.so.6.
I can only assume that the package manager only checks against its database rather than actually 'looking', and if this is so then for some reason or other the database wasn't made aware that the required lib was installed....probably by the original distribution.
I have assiduously avoided installing anything other than packages to avoid this problem!
Anyway, whatever the reason that the package manager doesn't know about it, it looks like I need a way of making it aware, so that my installation will go ahead.
Anyone have ideas as to how to do this.

Cheers,

unSpawn 02-25-2008 05:21 AM

Quote:

Originally Posted by terry-duell (Post 3068786)
I quick snoop in /usr/lib shows that I have libstdc++.so.6.0.8 and a link libstdc++.so.6 which points to libstdc++.so.6.

What does 'rpm -q libstdc++' or 'rpm -q --whatprovides /usr/lib/libstdc++.so.6.0.8' return?


Quote:

Originally Posted by terry-duell (Post 3068786)
I can only assume that the package manager only checks against its database rather than actually 'looking', and if this is so then for some reason or other the database wasn't made aware that the required lib was installed....probably by the original distribution.

RPM relies on the databases in /var/lib/rpm (making regular backups ain't a bad idea) to see what's installed and what dependencies need to be met . If executing the commands above resulted in it returning anything like "libstdc++" you'll know the package is in the database. Rarely a glitch happens and often removing temp files 'rm -f /var/lib/rpm/__db.00?' before retrying would be enough. Only in extreme circumstances a rebuild of the database would be necessary. BTW, there's no need to make assumptions if there's docs to read.


Quote:

Originally Posted by terry-duell (Post 3068786)
Anyway, whatever the reason that the package manager doesn't know about it, it looks like I need a way of making it aware, so that my installation will go ahead.

In the rare circumstance the libstdc++ package is in the database, and whatever you want to install does not have any other dependencies you need to install ('rpm -q -R -p package.rpm'), you can use rpm to test installation ('rpm -i --test -p package.rpm') and install ('rpm -i -p package.rpm') it.

terry-duell 02-25-2008 05:18 PM

Quote:

What does 'rpm -q libstdc++' or 'rpm -q --whatprovides /usr/lib/libstdc++.so.6.0.8' return?
[terry@linux ~]$ rpm -q libstdc++
libstdc++-4.1.2-33
[terry@linux ~]$ rpm -q --whatprovides /usr/lib/libstdc++.so.6.0.8
libstdc++-4.1.2-33

The error message about the missing dependency is
Error: Missing Dependency: libstdc++.so.6(GLIBCXX_3.4.9) is needed by package easy_plot

When I initially read it I assumed that the (GLIBCXX...) wasn't really part of the lib name. When I do...
[terry@linux Download]$ rpm -q -R -p easy_plot-20080122-1.i386.rpm
/bin/sh
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(CompressedFileNames) <= 3.0.4-1
libc.so.6
libc.so.6(GLIBC_2.0)
libc.so.6(GLIBC_2.1)
libc.so.6(GLIBC_2.1.1)
libc.so.6(GLIBC_2.1.3)
libc.so.6(GLIBC_2.2)
libc.so.6(GLIBC_2.2.3)
libc.so.6(GLIBC_2.3)
libc.so.6(GLIBC_2.3.4)
libc.so.6(GLIBC_2.4)
libcurl.so.4
libdl.so.2
libdl.so.2(GLIBC_2.0)
libdl.so.2(GLIBC_2.1)
libexpat.so.1
libgcc_s.so.1
libgcc_s.so.1(GCC_3.0)
libm.so.6
libncurses.so.5
libQtCore.so.4
libQtGui.so.4
libQtSql.so.4
libQtSvg.so.4
libQtXml.so.4
libstdc++.so.6
libstdc++.so.6(CXXABI_1.3)
libstdc++.so.6(GLIBCXX_3.4)
libstdc++.so.6(GLIBCXX_3.4.9)
libz.so.1
rpmlib(PayloadIsBzip2) <= 3.0.5-1

it looks like the (GLIBCXX...) is part of the name and is a different lib , as libstdc++.so.6 is listed separately.
As yum reported an error that lib isn't in the repositories I have enabled (livna, fedora, updates), so I had better go looking elsewhere.
Thanks for your help.

ps. I tried rm -f /var/lib/rpm/__db.00?, but it didn't make any difference, and now we know why.

If I still need help on this after searching for the missing lib, I'll post again.

Cheers,

shafty023 02-26-2008 09:12 AM

perhaps you need the compatibility libraries for libstdc++

yum install compat-libstdc++-33.i386

terry-duell 02-26-2008 04:10 PM

Quote:

perhaps you need the compatibility libraries for libstdc++

yum install compat-libstdc++-33.i386
The package manager reckons I have that installed. It said there was another, similar, lib available which I installed, but it still doesn't provide the one needed.
I have been trying to contact the package developers to learn more about this lib, but 'no answer was the stern reply'.
Not having much luck on this one.

Thanks for your help.


All times are GMT -5. The time now is 07:36 AM.