:-1: error: collect2: fatal error: cannot find 'ld'
-
Hello everyone,
I create a console application and i didn't add anything. But i can't solve this problem. I downloaded many libraries but it didn't work for me. Please help.Thanks in advance.
-
@sude said in :-1: error: collect2: fatal error: cannot find 'ld':
there is no ld folder.
ld is not a folder but an executable used to link your program. And you don't have installed it - install it with your package manager.
-
@sude said in :-1: error: collect2: fatal error: cannot find 'ld':
@JonB I can not understand, there is no ld folder.
@JonB said in :-1: error: collect2: fatal error: cannot find 'ld':
@sude
In a terminal what doeswhich ld
report?You just had to run that command and show its output.
Anyway if as @Christian-Ehrlicher says you don't have the necessary package installed then that is what you need to address. -
@sude said in :-1: error: collect2: fatal error: cannot find 'ld':
@JonB I can not understand, there is no ld folder.
@JonB said in :-1: error: collect2: fatal error: cannot find 'ld':
@sude
In a terminal what doeswhich ld
report?You just had to run that command and show its output.
Anyway if as @Christian-Ehrlicher says you don't have the necessary package installed then that is what you need to address. -
@sude said in :-1: error: collect2: fatal error: cannot find 'ld':
I installed but still there is an error.
@JonB said in :-1: error: collect2: fatal error: cannot find 'ld':
@sude
In a terminal what does 'which ld' report?Now the third request to execute this command...
-
@sude
After you have run thewhich ld
and reported its output.You have not said what OS you are running on, which would help for this question. Assuming you are Ubuntu or something which works similarly, please run this command:
locate --regex '/ld$'
and show us its output.
-
@sude
After you have run thewhich ld
and reported its output.You have not said what OS you are running on, which would help for this question. Assuming you are Ubuntu or something which works similarly, please run this command:
locate --regex '/ld$'
and show us its output.
-
@sude said in :-1: error: collect2: fatal error: cannot find 'ld':
I have rasbian but i can't see anyting about it as you can see.
Maybe a silly question, but did you install build essential package?
sudo apt install -y build-essential
-
@sude said in :-1: error: collect2: fatal error: cannot find 'ld':
I have rasbian but i can't see anyting about it as you can see.
Maybe a silly question, but did you install build essential package?
sudo apt install -y build-essential
@KroMignon Yes i did :(
-
@KroMignon Yes i did :(
-
@sude Just to be sure to understand what's going wrong: do you using your RaspberryPI to build or do you build a PC?
Is Qt Creator running on RaspberryPI or on PC?
@KroMignon It is rasbian and i am using raspberry pi 3 and i use qt creator in raspberry.
-
@KroMignon It is rasbian and i am using raspberry pi 3 and i use qt creator in raspberry.
-
@sude
Since your RPi does not have thelocate
command I suggested earlier, now try:find / -name ld -print 2>/dev/null
and show the output (better if you copy & paste the command run plus the output as text than show screen shots).
-
pi@raspberrypi:~ $ which ld
pi@raspberrypi:~ $ find / -name ld -print 2>/dev/null
/usr/bin/ld
/usr/lib/compat-ld/ld
/usr/lib/gold-ld/ld
/usr/share/doc/binutils/ld
pi@raspberrypi:~ $My terminal output is like that.