實驗室的專案做的快差不多了,昨天打算新裝一台centos機器進行下測試,師兄們先裝的redis、ssh、mysql、php等等需要的開發包和模組,我守在最後一關,但是到我這裡時候,yum不能使用了。報錯內容如下:
there was a problem importing one of the python modules測試機器是centos6 64位系統,剛開始我以為是python衝突(yum是python寫的),重灌了python沒有解決。之後又刪掉了yum,折騰了大半夜,沒有解決,之後我仔細閱讀了上文中的錯誤報告,於是使用命令:required to run yum. the error leading to this problem was:
/usr/lib/python2.6/site-packages/pycurl.so: undefined symbol: crypto_set_locking_callback
please install a package which provides this module, or
verify that the module is installed correctly.
it』s possible that the above module doesn』t match the
current version of python, which is:
2.6.6 (r266:84292, dec 7 2011, 20:38:36)
[gcc 4.4.6 20110731 (red hat 4.4.6-3)]
if you cannot solve this problem yourself, please go to
the yum faq at:
ldd /usr/lib/python2.6/site-packages/pycurl.so
程式顯示內容如下:
[root@centos6 site-packages]# ldd /usr/lib/python2.6/site-packages/pycurl.so我發現libssh2.so.1 => /usr/local/lib/libssh2.so.1 (0x00bff000) ,指向了/usr/local/lib。記憶中許多linux系統是預設安裝ssh的。於是命令檢視linux-gate.so.1 => (0x006da000)
libcurl.so.4 => /usr/lib/libcurl.so.4 (0x0065f000)
libpython2.6.so.1.0 => /usr/lib/libpython2.6.so.1.0 (0x00394000)
libpthread.so.0 => /lib/libpthread.so.0 (0x006f8000)
libc.so.6 => /lib/libc.so.6 (0x0087c000)
libidn.so.11 => /lib/libidn.so.11 (0x00a47000)
libldap-2.4.so.2 => /lib/libldap-2.4.so.2 (0x00110000)
librt.so.1 => /lib/librt.so.1 (0x00bf6000)
libgssapi_krb5.so.2 => /lib/libgssapi_krb5.so.2 (0x0056f000)
libkrb5.so.3 => /lib/libkrb5.so.3 (0x0015d000)
libk5crypto.so.3 => /lib/libk5crypto.so.3 (0x00fc1000)
libcom_err.so.2 => /lib/libcom_err.so.2 (0x00a83000)
libz.so.1 => /lib/libz.so.1 (0x0024f000)
libssl3.so => /usr/lib/libssl3.so (0x00263000)
libsmime3.so => /usr/lib/libsmime3.so (0x00790000)
libnss3.so => /usr/lib/libnss3.so (0x00a88000)
libnssutil3.so => /usr/lib/libnssutil3.so (0x00299000)
libplds4.so => /lib/libplds4.so (0x00233000)
libplc4.so => /lib/libplc4.so (0x00238000)
libnspr4.so => /lib/libnspr4.so (0x00f7e000)
libdl.so.2 => /lib/libdl.so.2 (0x00e34000)
libssh2.so.1 => /usr/local/lib/libssh2.so.1 (0x00bff000)
libutil.so.1 => /lib/libutil.so.1 (0x002b5000)
libm.so.6 => /lib/libm.so.6 (0x0032c000)
/lib/ld-linux.so.2 (0x00374000)
liblber-2.4.so.2 => /lib/liblber-2.4.so.2 (0x00d8a000)
libresolv.so.2 => /lib/libresolv.so.2 (0x002b9000)
libsasl2.so.2 => /usr/lib/libsasl2.so.2 (0x002d3000)
libkrb5support.so.0 => /lib/libkrb5support.so.0 (0x002ee000)
libkeyutils.so.1 => /lib/libkeyutils.so.1 (0x00d3b000)
libcrypt.so.1 => /lib/libcrypt.so.1 (0x002f9000)
libselinux.so.1 => /lib/libselinux.so.1 (0x00a24000)
libfreebl3.so => /lib/libfreebl3.so (0x005ae000)
[root@centos6 lib]# find / -name 「libssh2.so.1″感覺應該是動態庫衝突引起的yum不能使用。/usr/local/lib/libssh2.so.1
/usr/lib/libssh2.so.1
於是編輯 vim /etc/ld.so.conf
include ld.so.conf.d/*.conf
/usr/local/lib
改為:include ld.so.conf.d/*.conf
#/usr/local/lib
之後,再用ldconfig重新整理下動態鏈結庫,問題解決。
ps:可能自己程式安裝的動態鏈結庫位置在/usr/local/lib,刪掉/usr/local/lib可能會影響使用者自己安裝程式使用。不更改ld.so.conf,建立個軟鏈結應該可以解決。
yum 無法使用的解決方法
有一台伺服器,準備使用yum安裝乙個軟體包,結果報錯,yum list,yum clean,都不能正常使用 查詢了很多資料,說是python版本的問題,結果檢視也沒有發現問題 錯誤如下 yum list traceback most recent call last file usr bin yum...
yum命令無法使用問題的解決
執行 yum install 出現下面異常 錯誤 cannot find a valid baseurl for repo base yum在安裝時,需要進行配置yum源 centos 6 更換 yum 源 只需要在centos命令列介面下執行一下幾條命令 sed i s enabled 1 ena...
firefox無法使用yslow的解決方案
首先,yslow不支援firefox 36及以上版本。解決方案 使用yslow的書籤版本 使用方法 1.訪問這裡 2.把頁面最後的那個 desktop bookmarklet installation instructions 裡的 yslow 按鈕拖拽到火狐的書籤工具欄即可。3.使用的時候在需要的...