Redhat 5システムの64ビットプラットフォーム用のGLIBCXX_3_4_9ライブラリを含むlibstdc ++が必要です。これは申請に必要です。 RHEL 6リポジトリから次のrpmをインストールしようとしましたが、いくつかの依存関係の失敗のエラーメッセージが表示されました。
libstdc++-docs-4.4.7-4.el6.x86_64.rpm
libstdc++-devel-4.4.7-4.el6.x86_64.rpm
libstdc++-4.4.7-4.el6.x86_64.rpm
compat-libstdc++-33-3.2.3-69.el6.x86_64.rpm
compat-libstdc++-296-2.96-144.el6.i686.rpm
# rpm -Uvh libstdc++-4.4.7-4.el6.x86_64.rpm libstdc++-devel-4.4.7-4.el6.x86_64.rpm compat-libstdc++-296-2.96-144.el6.i686.rpm compat-libstdc++-33-3.2.3-69.el6.x86_64.rpm
warning: libstdc++-4.4.7-4.el6.x86_64.rpm: Header V3 RSA/SHA256 signature: NOKEY, key ID fd431d51
error: Failed dependencies:
glibc >= 2.10.90-7 is needed by libstdc++-4.4.7-4.el6.x86_64
rpmlib(FileDigests) <= 4.6.0-1 is needed by libstdc++-4.4.7-4.el6.x86_64
rpmlib(PayloadIsXz) <= 5.2-1 is needed by libstdc++-4.4.7-4.el6.x86_64
rpmlib(FileDigests) <= 4.6.0-1 is needed by libstdc++-devel-4.4.7-4.el6.x86_64
rpmlib(PayloadIsXz) <= 5.2-1 is needed by libstdc++-devel-4.4.7-4.el6.x86_64
libc.so.6(GLIBC_2.12) is needed by compat-libstdc++-296-2.96-144.el6.i686
rpmlib(FileDigests) <= 4.6.0-1 is needed by compat-libstdc++-296-2.96-144.el6.i686
rpmlib(PayloadIsXz) <= 5.2-1 is needed by compat-libstdc++-296-2.96-144.el6.i686
rpmlib(FileDigests) <= 4.6.0-1 is needed by compat-libstdc++-33-3.2.3-69.el6.x86_64
rpmlib(PayloadIsXz) <= 5.2-1 is needed by compat-libstdc++-33-3.2.3-69.el6.x86_64
libstdc++ = 4.1.2-54.el5 is needed by (installed) gcc-c++-4.1.2-54.el5.x86_64
libstdc++ = 4.1.2 is needed by (installed) libstdc++44-devel-4.4.7-1.el5.x86_64
libstdc++ = 4.1.2 is needed by (installed) libstdc++44-devel-4.4.7-1.el5.i386
libstdc++-devel = 4.1.2-54.el5 is needed by (installed) gcc-c++-4.1.2-54.el5.x86_64
Redheat 5(64ビット)システムにlibstdc ++.so.6.0.9以降をインストールする方法はありますか?
修正する:
これが出力ですyum search
# yum search gcc-c++
Loaded plugins: product-id, rhnplugin, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
This system is receiving updates from RHN Classic or RHN Satellite.
====================================================================================== Matched: gcc-c++ ======================================================================================
gcc-c++.x86_64 : C++ support for GCC
rhn 6リポジトリから最新バージョンのgcc ++をダウンロードしましたが、次のエラーが発生します。
# yum install gcc-c++-4.4.7-4.el6.x86_64.rpm
Loaded plugins: product-id, rhnplugin, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
This system is receiving updates from RHN Classic or RHN Satellite.
Setting up Install Process
Examining gcc-c++-4.4.7-4.el6.x86_64.rpm: gcc-c++-4.4.7-4.el6.x86_64
Marking gcc-c++-4.4.7-4.el6.x86_64.rpm as an update to gcc-c++-4.1.2-54.el5.x86_64
Resolving Dependencies
--> Running transaction check
---> Package gcc-c++.x86_64 0:4.4.7-4.el6 set to be updated
--> Processing Dependency: gcc = 4.4.7-4.el6 for package: gcc-c++
--> Processing Dependency: libstdc++ = 4.4.7-4.el6 for package: gcc-c++
--> Processing Dependency: libstdc++-devel = 4.4.7-4.el6 for package: gcc-c++
--> Processing Dependency: libc.so.6(GLIBC_2.11)(64bit) for package: gcc-c++
--> Processing Dependency: libc.so.6(GLIBC_2.7)(64bit) for package: gcc-c++
--> Processing Dependency: libgmp.so.3()(64bit) for package: gcc-c++
--> Processing Dependency: libmpfr.so.1()(64bit) for package: gcc-c++
--> Running transaction check
---> Package gcc-c++.x86_64 0:4.4.7-4.el6 set to be updated
--> Processing Dependency: gcc = 4.4.7-4.el6 for package: gcc-c++
--> Processing Dependency: libstdc++ = 4.4.7-4.el6 for package: gcc-c++
--> Processing Dependency: libstdc++-devel = 4.4.7-4.el6 for package: gcc-c++
--> Processing Dependency: libc.so.6(GLIBC_2.11)(64bit) for package: gcc-c++
--> Processing Dependency: libc.so.6(GLIBC_2.7)(64bit) for package: gcc-c++
--> Processing Dependency: libmpfr.so.1()(64bit) for package: gcc-c++
---> Package gmp.x86_64 0:4.1.4-10.el5 set to be updated
--> Finished Dependency Resolution
gcc-c++-4.4.7-4.el6.x86_64 from /gcc-c++-4.4.7-4.el6.x86_64 has depsolving problems
--> Missing Dependency: libstdc++-devel = 4.4.7-4.el6 is needed by package gcc-c++-4.4.7-4.el6.x86_64 (/gcc-c++-4.4.7-4.el6.x86_64)
gcc-c++-4.4.7-4.el6.x86_64 from /gcc-c++-4.4.7-4.el6.x86_64 has depsolving problems
--> Missing Dependency: libmpfr.so.1()(64bit) is needed by package gcc-c++-4.4.7-4.el6.x86_64 (/gcc-c++-4.4.7-4.el6.x86_64)
gcc-c++-4.4.7-4.el6.x86_64 from /gcc-c++-4.4.7-4.el6.x86_64 has depsolving problems
--> Missing Dependency: libc.so.6(GLIBC_2.7)(64bit) is needed by package gcc-c++-4.4.7-4.el6.x86_64 (/gcc-c++-4.4.7-4.el6.x86_64)
gcc-c++-4.4.7-4.el6.x86_64 from /gcc-c++-4.4.7-4.el6.x86_64 has depsolving problems
--> Missing Dependency: gcc = 4.4.7-4.el6 is needed by package gcc-c++-4.4.7-4.el6.x86_64 (/gcc-c++-4.4.7-4.el6.x86_64)
gcc-c++-4.4.7-4.el6.x86_64 from /gcc-c++-4.4.7-4.el6.x86_64 has depsolving problems
--> Missing Dependency: libstdc++ = 4.4.7-4.el6 is needed by package gcc-c++-4.4.7-4.el6.x86_64 (/gcc-c++-4.4.7-4.el6.x86_64)
gcc-c++-4.4.7-4.el6.x86_64 from /gcc-c++-4.4.7-4.el6.x86_64 has depsolving problems
--> Missing Dependency: libc.so.6(GLIBC_2.11)(64bit) is needed by package gcc-c++-4.4.7-4.el6.x86_64 (/gcc-c++-4.4.7-4.el6.x86_64)
Error: Missing Dependency: libstdc++ = 4.4.7-4.el6 is needed by package gcc-c++-4.4.7-4.el6.x86_64 (/gcc-c++-4.4.7-4.el6.x86_64)
Error: Missing Dependency: libc.so.6(GLIBC_2.7)(64bit) is needed by package gcc-c++-4.4.7-4.el6.x86_64 (/gcc-c++-4.4.7-4.el6.x86_64)
Error: Missing Dependency: gcc = 4.4.7-4.el6 is needed by package gcc-c++-4.4.7-4.el6.x86_64 (/gcc-c++-4.4.7-4.el6.x86_64)
Error: Missing Dependency: libstdc++-devel = 4.4.7-4.el6 is needed by package gcc-c++-4.4.7-4.el6.x86_64 (/gcc-c++-4.4.7-4.el6.x86_64)
Error: Missing Dependency: libc.so.6(GLIBC_2.11)(64bit) is needed by package gcc-c++-4.4.7-4.el6.x86_64 (/gcc-c++-4.4.7-4.el6.x86_64)
Error: Missing Dependency: libmpfr.so.1()(64bit) is needed by package gcc-c++-4.4.7-4.el6.x86_64 (/gcc-c++-4.4.7-4.el6.x86_64)
答え1
以下のスクリプトはすべてのことを行います。 GCC4.4パッケージをダウンロードしてコンパイルするだけでなく、必要な依存関係をダウンロードしてコンパイルします。#yum install zsh
このスクリプトはzshシェルで実行されるため、このスクリプトを実行する前にインストールする必要があるかもしれません。あなたのウェブサイトにこのスクリプトを提供したSimon Heimlicherに感謝します。ブログ。
#!/usr/bin/env zsh
# Download and compile GCC 4.4
set -ue
# Set minimal PATH to make sure we compile with the system compiler
export PATH=/usr/sbin:/usr/bin:/sbin:/bin
# Use bash as the shell for everything GNU
export CONFIG_SHELL=/bin/bash
# Set to true for verbose output
VERBOSE=${VERBOSE:=false}
out () { printf "\n%b\n\n" "$@" >&2 }
fail () { printf "\n%b\n\n" " $@ " >&2; exit 1 }
DSTROOT=${DSTROOT:=$HOME/local}
PKGROOT=${PKGROOT:=$DSTROOT/pkg}
SCRATCH=${SCRATCH:-$HOME/scratch}
SRCDIR=${SRCDIR:=$SCRATCH/gcc/src}
BUILDDIR=${BUILDDIR:=$SCRATCH/gcc/build}
GCC_URL=http://mirror.switch.ch/ftp/mirror/gnu/gcc/gcc-4.4.7/gcc-4.4.7.tar.bz2
GCC_PREREQUISITE_URLS=(
ftp://gcc.gnu.org/pub/gcc/infrastructure/gmp-4.3.2.tar.bz2
ftp://gcc.gnu.org/pub/gcc/infrastructure/mpfr-2.4.2.tar.bz2
ftp://gcc.gnu.org/pub/gcc/infrastructure/mpc-0.8.1.tar.gz
http://www.mr511.de/software/libelf-0.8.13.tar.gz
)
out "DSTROOT='$DSTROOT'
PKGROOT='$PKGROOT'
SRCDIR='$SRCDIR'
BUILDDIR='$BUILDDIR'"
runcmd() {
RUN_RET=0
RUN_CWD='.'
RUN_FORCE=false
o_cwd=''; o_force=''
zparseopts -D -K -- c:=o_cwd f=o_force -cwd:=o_cwd -force=o_force
if [[ $# -eq 0 ]]; then
print "Usage: runcmd [-f] <command line to run>" >&2
return 1
fi
if [[ -n $o_cwd ]]; then RUN_CWD=$o_cwd[2]; fi
if [[ -n $o_force ]]; then RUN_FORCE=true; fi
cmdline=$@
if $VERBOSE; then
print "Running\n ${(@)cmdline}\nRUN_FORCE=$RUN_FORCE RUN_CWD=$RUN_CWD" >&2
fi
( set +ue; cd $RUN_CWD && print ${(@)cmdline} | $CONFIG_SHELL -sue; )
RUN_RET=$?
if [[ $RUN_RET -ne 0 ]]; then
if $RUN_FORCE; then
print "\n### $cmdline\nexit $RUN_RET in CWD=$RUN_CWD\n" >&2
else
print "\n\n### $cmdline\nexit $RUN_RET in CWD=$RUN_CWD\nAbort." >&2
exit $RUN_RET
fi
fi
return $RUN_RET
}
prepare_pkg () {
local srcdir=$1
local url=$2
local pkgvers=${${url##*/}%.(tar*|zip)}
local pkg=${pkgvers%-*}
local vers=${pkgvers#*-}
local suffix=${${url##*/}##*.}
out "Fetching $pkgvers from $url"
case $suffix in
gz)
runcmd -c $srcdir curl -L $url \| tar xz
;;
bz2|tbz)
runcmd -c $srcdir curl -L $url \| tar xj
;;
zip)
runcmd -c $srcdir curl -L $url \| funzip
;;
*)
fail "Unknown archive format: $url"
;;
esac
if [[ ! -d $srcdir/$pkgvers ]]; then
fail "Extraction of download from $url failed"
fi
runcmd -c $srcdir ln -sf $pkgvers $pkg
}
if $VERBOSE; then
printf "Using system compiler: '%s'" $(which gcc)
gcc --version
fi
out "Making directories \n$DSTROOT\n$PKGROOT\n$SRCDIR\n$BUILDDIR"
runcmd mkdir -p $DSTROOT $PKGROOT $SRCDIR $BUILDDIR
GCC_PKG=${${GCC_URL##*/}%.(tar*|zip)}
GCC_SRC=$SRCDIR/$GCC_PKG
GCC_PREFIX=$PKGROOT/$GCC_PKG
GCC_BUILD=$BUILDDIR/$GCC_PKG-build
if [[ -d $GCC_SRC ]]; then
out "Using GCC downloaded at $GCC_SRC"
else
out "Downloading GCC"
prepare_pkg $SRCDIR $GCC_URL
fi
out "Downloading prerequisites"
for pkg ($GCC_PREREQUISITE_URLS); do
prepare_pkg $GCC_SRC $pkg
done
if [[ -d $GCC_BUILD ]]; then
out "Running 'make distclean' in $GCC_BUILD"
runcmd -c $GCC_BUILD -f make distclean
else
out "Making GCC build directory $GCC_BUILD"
runcmd mkdir -p $GCC_BUILD
fi
out "Configuring GCC"
runcmd -c $GCC_BUILD $GCC_SRC/configure --prefix=$GCC_PREFIX \
--enable-languages=c,c++,fortran \
--enable-threads=posix \
--enable-tls \
--enable-libgomp \
--enable-lto \
--enable-shared \
--enable-static \
--disable-nls \
--disable-multilib \
--with-fpmath=sse
out "Compiling GCC"
runcmd -c $GCC_BUILD make -j 8 all
out "Installing GCC"
runcmd -c $GCC_BUILD make -j 8 install
if which stow &>/dev/null; then
out "Using 'stow' to symlink GCC from $GCC_PKG"
runcmd -c $PKGROOT stow $GCC_PKG
else
out "Package manager 'stow' not found. GCC is installed in $GCC_PREFIX"
fi
print "All done"
答え2
RHEL6
root@ibxsv-asnis1 ~]# rpm -q --provides libstdc++
libstdc++ = 4.4.4-15.el6
libstdc++.so.6()(64bit)
libstdc++.so.6(CXXABI_1.3)(64bit)
libstdc++.so.6(CXXABI_1.3.1)(64bit)
libstdc++.so.6(CXXABI_1.3.2)(64bit)
libstdc++.so.6(CXXABI_1.3.3)(64bit)
libstdc++.so.6(GLIBCXX_3.4)(64bit)
libstdc++.so.6(GLIBCXX_3.4.1)(64bit)
libstdc++.so.6(GLIBCXX_3.4.10)(64bit)
libstdc++.so.6(GLIBCXX_3.4.11)(64bit)
libstdc++.so.6(GLIBCXX_3.4.12)(64bit)
libstdc++.so.6(GLIBCXX_3.4.13)(64bit)
libstdc++.so.6(GLIBCXX_3.4.2)(64bit)
libstdc++.so.6(GLIBCXX_3.4.3)(64bit)
libstdc++.so.6(GLIBCXX_3.4.4)(64bit)
libstdc++.so.6(GLIBCXX_3.4.5)(64bit)
libstdc++.so.6(GLIBCXX_3.4.6)(64bit)
libstdc++.so.6(GLIBCXX_3.4.7)(64bit)
libstdc++.so.6(GLIBCXX_3.4.8)(64bit)
libstdc++.so.6(GLIBCXX_3.4.9)(64bit)
libstdc++ = 4.4.7-4.el6
libstdc++(x86-64) = 4.4.7-4.el6
[root@ibxsv-asnis1 ~]# rpm -q libstdc++
libstdc++-4.4.7-4.el6.x86_64
答え3
yumを使用してg ++をインストールすると、依存関係の問題自体が解決されます。
だから試してみてください:
yum search g++
g++
その後、インストールする場合は、依存関係をインストールするpacjageを見つけます。依存関係の1つは次のとおりです。libstdc++