1. 程式人生 > >Ubuntu14.04 編譯 /usr/bin/ld: cannot find -l*** 問題

Ubuntu14.04 編譯 /usr/bin/ld: cannot find -l*** 問題

問題描述
在Ubuntu14系統中使用QTcreatr3.3.0(Based on Qt 5.4.0 (GCC 4.6.1, 64 bit))編譯已存在的QT工程時,報錯,一共兩次

/usr/bin/ld: cannot find -iGL

/usr/bin/ld: cannot find -iSDL

覺得這次主要問題在於一開始g++版本不對應,而自己瞎改,沒有中規中矩的使用apt-get install進行適當升級或下載處理,再然後,隨意拷貝複製,企圖用其他完好的/usr/include/目錄覆蓋自己出問題的目錄檔案,U盤拷貝是不會識別並完整拷貝碟符(猜測是軟連線之類的)。
依然依靠強大的度娘。

問題原因

一般出現這種錯誤有以下幾種原因:

1.系統缺乏對應的庫檔案;

2.版本不對應;

3.庫檔案的連結錯誤;

4.庫檔案路徑設定問題;

而我出現的問題就在於前兩種。

解決方法

對於第1種和第二種錯誤:

apt-get install libxxx-dev

所以結合網上的部落格,輸入以下命令解決我的錯誤

sudo apt-get install libgl1-mesa-dev
sudo apt-get install libSDL-dev

相關推薦

Ubuntu14.04 編譯 /usr/bin/ld: cannot find -l*** 問題

問題描述: 在Ubuntu14系統中使用QTcreatr3.3.0(Based on Qt 5.4.0 (GCC 4.6.1, 64 bit))編譯已存在的QT工程時,報錯,一共兩次 /usr/bin/ld: cannot find -iGL

Linux環境下gcc靜態編譯/usr/bin/ld: cannot find -lc錯誤原因及解決方法 原因:

原因: 一般出現這個問題的時候,Makefile中肯定有-static選項。這其實是靜態連結時沒有找到libc.a。 解決方案: 需要安裝glibc-static.xxx.rpm,如glibc-static-2.12-1.107.el6_4.2.i686.rpm,或是yum install gli

精闢!!/usr/bin/ld: cannot find -l* 問題的解決方法

如果編譯時,有類似如下的錯誤提示: /usr/bin/ld: cannot find -lpci 則可以安裝相應的庫,來解決這個問題: sudo apt-get install libpci-dev 其實就是缺少*就安裝*  /u

編譯時遇到/usr/bin/ld: cannot find -lluajit 解決方法

今天編譯一個c++和torch程式的時候爆出了/usr/bin/ld: cannot find -lluajit的錯誤,幾經折騰,終於吧這個問題解決了, 出現這個問題的原因就是luajit沒有安裝到正確的位置. 1.下載luajit http://luajit.org/download.

vddk 編譯錯誤 /usr/bin/ld:cannot find -lthrift

問題描述 編譯 vddk 時報錯: /usr/bin/ld: cannot find -lthrift collect2: 錯誤:ld 返回 1 make: *** [vddk] 錯誤 1 或者報如下錯誤: In file included fr

處理 /usr/bin/ld: cannot find -lc編譯問題

用g++編譯C++程式時顯示出: /usr/lib/ld: cannot find -lc /usr/lib/ld: cannot find -lgcc_s /usr/lib/ld: cannot find -lm /usr/lib/ld: cannot find -lgcc_s 的錯誤。在網上看了很多中關於

CentOS安裝Qt編譯錯誤以及無法除錯的問題解決( /usr/bin/ld:cannot findlGL 和 Debugginghas failed)

CentOS安裝Qt編譯錯誤以及無法除錯的問題解決 1、前提 系統: CentOS-6.5-x86_64-minimal.iso 最小化linux. 手動安裝x-winodws介面。 Qt版本:qt-opensource-linux-x64-5.6.0.run。 安裝qt需

編譯hostapd時,出現錯誤:/usr/bin/ld: cannot find -lnl

[email protected]:/work/project/wifi/04.hostapd/hostapd-2.0/hostapd$ make /usr/bin/ld: cannot find -lnl collect2: ld returned 1 exit

編譯時遇到 /usr/bin/ld: cannot find -lxxx 錯誤的解決方法

本文介紹下,在編譯軟體時,提示usr/bin/ld: cannot find錯誤的解決方法,有需要的朋友參考下。 原因:庫檔案並沒有匯入的ld檢索目錄中。 解決方法:    1、確認庫檔案是否存在,比如-l123, 在/usr/lib, /usr/local/lib,

編譯過程中提示 /usr/bin/ld: cannot find

在編譯過程中遇到 找不到 /usr/bin/ld: cannot find -lxtst. 首先在本地搜尋該檔案: apt-file/aptitude search xtst; 通過pkg-confi

解決編譯時遇到的/usr/bin/ld: cannot find -lpthreads問題

sudo apt-get update && sudo apt-get install build-essential libevent-pthreads-2.0.5 doxygen

/usr/bin/ld: cannot find -lltdl collect2: ld returned 1 exit status make: *** [sapi/cgi/php-cgi] Err

usr 方法 pos track data- -m stat cgi error /usr/bin/ld: cannot find -lltdl collect2: ld returned 1 exit status make: *** [sapi/cgi/php-cg

安裝 sysbench的 報錯 /usr/bin/ld: cannot find -lmysqlclient_r 解決辦法

cli 既然 cannot ibm 這樣的 mysq 文件名 can 都是 首先你需要找到這個庫的位置 一般找的話需要將lib 給加上(註意:我這裏是 -lmysqlclient_r 的報錯,於是我找就找 libmysqlclient_r ) find / -name

/usr/bin/ld: cannot find -lxxx 的解決辦法

建立 html 解決方法 gcc bash 存在 cannot 重建 ext 在軟件編譯過程中,經常會碰到類似這樣的編譯錯誤: /usr/bin/ld: cannot find -lhdf5 這表示找不到庫文件 libhdf5.so,若是其它庫文件,則是 cannot

安裝caffe /usr/bin/ld: cannot find -lhdf5

 每次安裝都是新的體驗: 如果編譯caffe時提示找不到libhdf5.so , 錯誤提示為:/usr/bin/ld: cannot find -lhdf5 使用命令sudo find / -name libhdf5.so , 我找到的路徑為: /usr/lib/x86_64-linu

關於usr/bin/ld: cannot find -lxxx問題總結

  linux下編譯應用程式常常會出現如下錯誤:     /usr/bin/ld: cannot find

/usr/bin/ld: cannot find -lxxx 的解決辦法 新增動態連結庫的搜尋路徑

/usr/bin/ld: cannot find -lxxx 的解決辦法 在軟體編譯過程中,經常會碰到類似這樣的編譯錯誤: /usr/bin/ld: cannot find -lhdf5 這表示找不到庫檔案 libhdf5.so,若是其它庫檔案,則是 cannot find -lxxx 了

/usr/bin/ld: cannot find -lc 解決

[linux_day01]#cc -static hello.c /usr/bin/ld: cannot find -lccollect2: ld 返回 1主要原因是,在安裝Linux時,如果不選擇開發環境,會預設安裝需要的動態庫,但不會安裝靜態庫。如果我們在靜態連線程式時,會找不到libc.a這個基礎靜態庫

gcc連線靜態庫的時候的出現錯誤/usr/bin/ld: cannot find -lc

gcc連線靜態庫的時候出現錯誤提示:/usr/bin/ld: cannot find -lc 具體過程:gcc main.c -o test -Ladd -ladd -Lsub -lsub  -Iad

/usr/bin/ld: cannot find -lc 的解決辦法

1. gcc沒有加-static引數 使用find /usr/ -name "libc.so",如果沒有內容搜出來,那麼就是qlibc沒有裝,需要安裝一個。在CentOS-6.2-x86_64-bin-DVD1.iso裡面有qlibc的安裝包。網上很多配yum repo的教