ld-linux.so.2的解決方法
(使用的時候出現一個錯誤
bash: /usr/local/bin/rar: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory
是因爲64位系統中安裝了32位程序
解決方法:
yum install glibc.i686
重新安裝以後還有如下類系錯誤再繼續安裝包
error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
yum install libstdc++.so.6
========================================================================
問題一,64位系統中安裝了32位程序解決辦法
是因爲64位系統中安裝了32位程序
解決方法:
代碼如下 複製代碼
yum install glibc.i686
問題二,解決交叉編譯環境錯誤
# arm-linux-gcc hello.c -o tt
/home/gl/usr/local/arm/4.3.2/bin/arm-linux-gcc: /home/gl/usr/local/arm/4.3.2/bin/arm-none-linux-gnueabi-gcc: /lib/ld-linux.so.2: bad ELF interpreter: 沒有那個文件或目錄
/home/gl/usr/local/arm/4.3.2/bin/arm-linux-gcc:行3: /home/gl/usr/local/arm/4.3.2/bin/arm-none-linux-gnueabi-gcc: 成功
[root@austgl gl]# yum install ld-linux.so.2
已加載插件:langpacks, presto, refresh-packagekit
解決依賴關係
--> 執行事務檢查
---> 軟件包 glibc.i686.0.2.16-28.fc18 將被 安裝
--> 處理依賴關係 libfreebl3.so(N***AWHASH_3.12.3),它被軟件包 glibc-2.16-28.fc18.i686 需要
--> 處理依賴關係 libfreebl3.so,它被軟件包 glibc-2.16-28.fc18.i686 需要
--> 執行事務檢查
---> 軟件包 nss-softokn-freebl.i686.0.3.14.3-1.fc18 將被 安裝
--> 完成依賴關係計算
^[^A
依賴關係解決
================================================================================
Package 架構 版本 倉庫 大小
================================================================================
正在安裝:
glibc i686 2.16-28.fc18 updates 4.2 M
爲依賴而安裝:
nss-softokn-freebl i686 3.14.3-1.fc18 updates 146 k
事務概要
================================================================================
安裝 1 軟件包 (+1 Dependent package)
總下載量:4.3 M
安裝大小:15 M
確定嗎?[y/N]:y
確定嗎?[y/N]:y
下載軟件包:
nss-softokn-freebl-3.14.3-1.fc FAILED 105 kB/s | 301 kB 00:00:39(www.111cn.net) ETA
http://mirrors.ispros.com.bd/fed ... .3-1.fc18.i686.rpm: [Errno 14] curl#22 - "The requested URL returned error: 404 Not Found"
嘗試該詞語是禁止的鏡像。
(1/2): glibc-2.16-28.fc18.i686.rpm | 4.2 MB 00:00:14
(2/2): nss-softokn-freebl-3.14.3-1.fc18.i686.rpm | 146 kB 00:00:35
----------------------------------------------------------------------------------------------------------------
總計 104 kB/s | 4.3 MB 00:42
運行事務檢查
執行事務測試
事務測試成功
執行事務
正在安裝 : nss-softokn-freebl-3.14.3-1.fc18.i686 1/2
正在安裝 : glibc-2.16-28.fc18.i686 2/2
Verifying : glibc-2.16-28.fc18.i686 1/2
Verifying : nss-softokn-freebl-3.14.3-1.fc18.i686 2/2
已安裝:
glibc.i686 0:2.16-28.fc18
作爲依賴被安裝:
nss-softokn-freebl.i686 0:3.14.3-1.fc18
完畢!
[root@austgl gl]# arm-linux-gcc hello.c -o tt
hello.c: In function 'main':
hello.c:3: warning: return type of 'main' is not 'int'
[root@austgl gl]# file tt
tt: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.14, not stripped
[root@austgl gl]#
from:http://www.111cn.net/sys/linux/55374.htm