出現"/usr/bin/ld: cannot find -lc" - Linux

David avatar
By David
at 2015-10-25T13:52

Table of Contents


我編譯程式時, 輸入的編譯指令如下:

cc -Wall -g -static -o myFile myFile.c

結果出現這個錯誤訊息:
/usr/bin/ld: cannot find -lc


我上網查一下,
/usr/bin/ld: cannot find -lXXX

似乎是因為我沒有安裝特定的套件.


不好意思請問...
/usr/bin/ld: cannot find -lc

會出現"-lc", 是因為我少安裝了什麼套件嗎?


謝謝指教~~


--
Tags: Linux

All Comments

Elizabeth avatar
By Elizabeth
at 2015-10-29T03:49
yum provides ld
Puput avatar
By Puput
at 2015-11-02T17:10
缺啥裝啥
Frederica avatar
By Frederica
at 2015-11-06T11:20
不好意思 要如何看出"-lc"代表我缺什麼樣的套件呢?
Gary avatar
By Gary
at 2015-11-10T20:20
要看你原始碼 有用哪個 library
Rae avatar
By Rae
at 2015-11-14T02:25
-lc 就缺 libc 啊 XD
Olga avatar
By Olga
at 2015-11-18T03:36
glibc-static 這類套件安裝上去看看
Quintina avatar
By Quintina
at 2015-11-18T06:00
推六樓 你要編static版本得要有libc.a才行
Donna avatar
By Donna
at 2015-11-18T13:44
後來依照樓上各位的指示, 終於解決了.
謝謝樓上各位的指教
Hedda avatar
By Hedda
at 2015-11-21T23:24
推6樓,老師逛版被發現XDDDD

bitbucket被攻擊

Sandy avatar
By Sandy
at 2015-10-23T22:31
晚上9點多,本來git push到bitbucket還可以正常運作,到了9點半再git push時就出現了 ssh_exchange_identification: Connection closed by remote host fatal: Could not read from remote repos ...

編譯時遇到boost函式庫的問題

Anthony avatar
By Anthony
at 2015-10-23T21:21
系統:opensuse13.2 我想要使用graph-tool,所以照著https://graph-tool.skewed.de/download 的指示更新了gcc到49,用source-install安裝了cgal和boost、boost-devel和python3 套件。 不過./confi ...

vm workstation環境移至vSphere client

Necoo avatar
By Necoo
at 2015-10-23T16:31
各位版友好, 不清楚是否適合在這裡問這個問題, 因為要在vSphere中建多台機器, 想要自己建立一台DHCP server配IP給其他機器, 請問能夠在自己電腦裡的vm workstation 建立好DHCP server之後, 再把環境搬到vSphere client裡面嗎? 如果可以,我該用 ...

Virtualbox guest處理file io很慢

Olga avatar
By Olga
at 2015-10-23T15:55
※ 引述《aMaa (aMa)》之銘言: : 環境 host: windows7 RAM 4G 64bit 硬碟1T : guest: ubuntu 12.04 RAM 2G 32bit 硬碟480G : https://github.com/nexgenta/opencaster/blob/mas ...

徵System Engineer/Server Application Pr

Rosalind avatar
By Rosalind
at 2015-10-23T13:36
AtGames 徵System Engineer/Server Application Programmer 需求人數:1-2 人 職務類別:網路管理工程師、系統維護╱操作人員、資訊設備管制人員 職務說明: 大專以上畢,主修資訊電腦類科系尤佳。 至少三年以上 Linux 伺服器管理工作經驗,Ubuntu 尤 ...