version `GLIBCXX_3.4.21' not found 解決辦法
阿新 • • 發佈:2019-01-07
在安裝cmake3.5.1執行./bootstrap的時候出現如下提示:
gmake: “cmake”是最新的。
/usr/soft/cmake-3.5.1/Bootstrap.cmk/cmake: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /usr/soft/cmake-3.5.1/Bootstrap.cmk/cmake)
---------------------------------------------
Error when bootstrapping CMake:
Problem while running initial CMake
缺少GLIBCXX_3.4.21,或更高版本
為了核實版本問題:
[root@DESKTOP-RCOA9NR cmake-3.5.1]# strings /usr/lib64/libstdc++.so.6|grep GLIBCXX
GLIBCXX_3.4
GLIBCXX_3.4.1
GLIBCXX_3.4.2
GLIBCXX_3.4.3
GLIBCXX_3.4.4
GLIBCXX_3.4.5
GLIBCXX_3.4.6
GLIBCXX_3.4.7
GLIBCXX_3.4.8
GLIBCXX_3.4.9
GLIBCXX_3.4.10
GLIBCXX_3.4.11
GLIBCXX_3.4.12
GLIBCXX_3.4.13
GLIBCXX_3.4.14
GLIBCXX_3.4.15
GLIBCXX_3.4.16
GLIBCXX_3.4.17
GLIBCXX_3.4.18
GLIBCXX_3.4.19
GLIBCXX_DEBUG_MESSAGE_LENGTH
當前的版本的沒有發現GLIBCXX_3.4.21,但是我剛裝個gcc5.3.0
順著gcc的安裝路徑,找到了新的libstdc++:
[root@DESKTOP-RCOA9NR bin]# strings /usr/local/lib64/libstdc++.so.6|grep GLIBCXX
GLIBCXX_3.4
GLIBCXX_3 .4.1
GLIBCXX_3.4.2
GLIBCXX_3.4.3
GLIBCXX_3.4.4
GLIBCXX_3.4.5
GLIBCXX_3.4.6
GLIBCXX_3.4.7
GLIBCXX_3.4.8
GLIBCXX_3.4.9
GLIBCXX_3.4.10
GLIBCXX_3.4.11
GLIBCXX_3.4.12
GLIBCXX_3.4.13
GLIBCXX_3.4.14
GLIBCXX_3.4.15
GLIBCXX_3.4.16
GLIBCXX_3.4.17
GLIBCXX_3.4.18
GLIBCXX_3.4.19
GLIBCXX_3.4.20
GLIBCXX_3.4.21
GLIBCXX_DEBUG_MESSAGE_LENGTH
_ZNKSt14basic_ifstreamIcSt11char_traitsIcEE7is_openEv@GLIBCXX_3.4
_ZNSt13basic_istreamIwSt11char_traitsIwEE6ignoreEv@@GLIBCXX_3.4.5
_ZNKSbIwSt11char_traitsIwESaIwEE11_M_disjunctEPKw@GLIBCXX_3.4
_ZNKSt14basic_ifstreamIwSt11char_traitsIwEE7is_openEv@@GLIBCXX_3.4.5
GLIBCXX_3.4.21
GLIBCXX_3.4.5
GLIBCXX_3.4.9
_ZSt10adopt_lock@@GLIBCXX_3.4.11
GLIBCXX_3.4.10
GLIBCXX_3.4.16
GLIBCXX_3.4.1
_ZNSt19istreambuf_iteratorIcSt11char_traitsIcEEppEv@GLIBCXX_3.4
_ZNSs7_M_copyEPcPKcm@GLIBCXX_3.4
_ZNSt19istreambuf_iteratorIcSt11char_traitsIcEEppEv@@GLIBCXX_3.4.5
_ZNSs7_M_moveEPcPKcm@@GLIBCXX_3.4.5
_ZNKSt13basic_fstreamIwSt11char_traitsIwEE7is_openEv@GLIBCXX_3.4
_ZNKSt13basic_fstreamIcSt11char_traitsIcEE7is_openEv@GLIBCXX_3.4
_ZNSbIwSt11char_traitsIwESaIwEE4_Rep26_M_set_length_and_sharableEm@@GLIBCXX_3.4.5
_ZNSs4_Rep26_M_set_length_and_sharableEm@GLIBCXX_3.4
_ZSt10defer_lock@@GLIBCXX_3.4.11
_ZN10__gnu_norm15_List_node_base4swapERS0_S1_@@GLIBCXX_3.4
_ZNSs9_M_assignEPcmc@@GLIBCXX_3.4.5
_ZNKSbIwSt11char_traitsIwESaIwEE15_M_check_lengthEmmPKc@@GLIBCXX_3.4.5
_ZNKSt14basic_ifstreamIcSt11char_traitsIcEE7is_openEv@@GLIBCXX_3.4.5
_ZNSbIwSt11char_traitsIwESaIwEE7_M_moveEPwPKwm@GLIBCXX_3.4
_ZNVSt9__atomic011atomic_flag12test_and_setESt12memory_order@@GLIBCXX_3.4.11
GLIBCXX_3.4.20
_ZNSt11char_traitsIwE2eqERKwS2_@@GLIBCXX_3.4.5
GLIBCXX_3.4.12
_ZNSi6ignoreEv@@GLIBCXX_3.4.5
GLIBCXX_3.4.2
_ZNSt11char_traitsIcE2eqERKcS2_@@GLIBCXX_3.4.5
GLIBCXX_3.4.6
GLIBCXX_3.4.15
_ZNKSt13basic_fstreamIcSt11char_traitsIcEE7is_openEv@@GLIBCXX_3.4.5
_ZNSs9_M_assignEPcmc@GLIBCXX_3.4
GLIBCXX_3.4.19
_ZNKSt14basic_ofstreamIwSt11char_traitsIwEE7is_openEv@GLIBCXX_3.4
_ZNSt19istreambuf_iteratorIwSt11char_traitsIwEEppEv@GLIBCXX_3.4
_ZN10__gnu_norm15_List_node_base7reverseEv@@GLIBCXX_3.4
_ZN10__gnu_norm15_List_node_base4hookEPS0_@@GLIBCXX_3.4
_ZNSt11char_traitsIwE2eqERKwS2_@GLIBCXX_3.4
_ZNSbIwSt11char_traitsIwESaIwEE7_M_copyEPwPKwm@GLIBCXX_3.4
_ZNSbIwSt11char_traitsIwESaIwEE7_M_copyEPwPKwm@@GLIBCXX_3.4.5
GLIBCXX_3.4.11
GLIBCXX_3.4.3
GLIBCXX_3.4.7
_ZNSi6ignoreEl@@GLIBCXX_3.4.5
_ZNKSbIwSt11char_traitsIwESaIwEE11_M_disjunctEPKw@@GLIBCXX_3.4.5
_ZNSt13basic_istreamIwSt11char_traitsIwEE6ignoreEv@GLIBCXX_3.4
_ZNKSt13basic_fstreamIwSt11char_traitsIwEE7is_openEv@@GLIBCXX_3.4.5
GLIBCXX_3.4.14
_ZNSbIwSt11char_traitsIwESaIwEE7_M_moveEPwPKwm@@GLIBCXX_3.4.5
GLIBCXX_3.4.18
_ZNSbIwSt11char_traitsIwESaIwEE4_Rep26_M_set_length_and_sharableEm@GLIBCXX_3.4
_ZNSt13basic_istreamIwSt11char_traitsIwEE6ignoreEl@@GLIBCXX_3.4.5
_ZSt15future_category@@GLIBCXX_3.4.14
_ZNSi6ignoreEl@GLIBCXX_3.4
GLIBCXX_3.4
_ZNSt11char_traitsIcE2eqERKcS2_@GLIBCXX_3.4
_ZNKSs15_M_check_lengthEmmPKc@GLIBCXX_3.4
_ZN10__gnu_norm15_List_node_base8transferEPS0_S1_@@GLIBCXX_3.4
_ZNSbIwSt11char_traitsIwESaIwEE9_M_assignEPwmw@GLIBCXX_3.4
_ZNVSt9__atomic011atomic_flag5clearESt12memory_order@@GLIBCXX_3.4.11
_ZNKSt14basic_ofstreamIcSt11char_traitsIcEE7is_openEv@@GLIBCXX_3.4.5
_ZNKSt14basic_ofstreamIcSt11char_traitsIcEE7is_openEv@GLIBCXX_3.4
_ZNSs7_M_moveEPcPKcm@GLIBCXX_3.4
_ZNSt13basic_istreamIwSt11char_traitsIwEE6ignoreEl@GLIBCXX_3.4
_ZNSbIwSt11char_traitsIwESaIwEE9_M_assignEPwmw@@GLIBCXX_3.4.5
_ZNKSbIwSt11char_traitsIwESaIwEE15_M_check_lengthEmmPKc@GLIBCXX_3.4
_ZNKSs11_M_disjunctEPKc@@GLIBCXX_3.4.5
_ZN10__gnu_norm15_List_node_base6unhookEv@@GLIBCXX_3.4
_ZNSt19istreambuf_iteratorIwSt11char_traitsIwEEppEv@@GLIBCXX_3.4.5
_ZNSi6ignoreEv@GLIBCXX_3.4
_ZNSs7_M_copyEPcPKcm@@GLIBCXX_3.4.5
GLIBCXX_3.4.8
GLIBCXX_3.4.13
_ZSt11try_to_lock@@GLIBCXX_3.4.11
_ZNKSt14basic_ofstreamIwSt11char_traitsIwEE7is_openEv@@GLIBCXX_3.4.5
GLIBCXX_3.4.17
GLIBCXX_3.4.4
_ZNKSs15_M_check_lengthEmmPKc@@GLIBCXX_3.4.5
_ZNKSt14basic_ifstreamIwSt11char_traitsIwEE7is_openEv@GLIBCXX_3.4
_ZNSs4_Rep26_M_set_length_and_sharableEm@@GLIBCXX_3.4.5
_ZNKSs11_M_disjunctEPKc@GLIBCXX_3.4
這裡該有的都有了,把這份軟鏈到正確的地方,就好了。
cp /usr/local/lib64/libstdc++.so.6.0.21 /usr/lib64/
cd /usr/lib64/
rm -f libstdc++.so.6
ln -s libstdc++.so.6.0.21 libstdc++.so.6
[[email protected] lib64]# ll libstdc*
lrwxrwxrwx. 1 root root 19 4月 7 23:43 libstdc++.so.6 -> libstdc++.so.6.0.21
-rwxr-xr-x. 1 root root 995840 11月 19 22:20 libstdc++.so.6.0.19
-rwxr-xr-x. 1 root root 11093843 4月 7 23:39 libstdc++.so.6.0.21
至此再次執行
./bootstrap
gmake
make install
cmake安裝完畢