Linux always prompts compat-libstdc ++ is not installed, compatlibstdc
When you check whether some packages are installed on a Linux server, the system always prompts "package compat-libstdc ++ is not installed"
[root@DB-Server ~]# rpm -q --qf '%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n' binutils \
> compat-libstdc++ \
> elfutils-libelf \
> elfutils-libelf-devel \
> gcc \
> gcc-c++ \
> glibc \
> glibc-common \
> glibc-devel \
> glibc-headers \
> ksh \
> libaio \
> libaio \
> libaio-devel \
> libgcc \
> libstdc++ \
> libstdc++-devel \
> make \
> sysstat
binutils-2.17.50.0.6-14.el5 (x86_64)
package compat-libstdc++ is not installed
elfutils-libelf-0.137-3.el5 (x86_64)
elfutils-libelf-0.137-3.el5 (i386)
elfutils-libelf-devel-0.137-3.el5 (x86_64)
gcc-4.1.2-51.el5 (x86_64)
gcc-c++-4.1.2-51.el5 (x86_64)
glibc-2.5-65 (x86_64)
glibc-2.5-65 (i686)
glibc-common-2.5-65 (x86_64)
glibc-devel-2.5-65 (x86_64)
glibc-devel-2.5-65 (i386)
glibc-headers-2.5-65 (x86_64)
ksh-20100202-1.el5_6.6 (x86_64)
libaio-0.3.106-5 (x86_64)
libaio-0.3.106-5 (i386)
libaio-0.3.106-5 (x86_64)
libaio-0.3.106-5 (i386)
libaio-devel-0.3.106-5 (x86_64)
libaio-devel-0.3.106-5 (i386)
libgcc-4.1.2-51.el5 (x86_64)
libgcc-4.1.2-51.el5 (i386)
libstdc++-4.1.2-51.el5 (x86_64)
libstdc++-4.1.2-51.el5 (i386)
libstdc++-devel-4.1.2-51.el5 (x86_64)
make-3.81-3.el5 (x86_64)
sysstat-7.0.2-11.el5 (x86_64)
[root@DB-Server ~]#
[root@DB-Server ~]# rpm -qa | grep "compat-libstdc"
compat-libstdc++-33-3.2.3-61
compat-libstdc++-33-3.2.3-61
compat-libstdc++-296-2.96-138
[root@DB-Server ~]#
However, if the above Command finds that these packages have been installed, why is it always prompted that compat-libstdc ++ is not installed? This is because the package name is incorrect when rpm is used for query. It is actually registered as compat-libstdc ++-33 instead of compat-libstdc ++. If the package name is correct, the query results will be different, as shown below:
[root@DB-Server ~]# rpm -q --qf '%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n' compat-libstdc++-33
compat-libstdc++-33-3.2.3-61 (x86_64)
compat-libstdc++-33-3.2.3-61 (i386)