public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* How do I fix the ld program (the linker for gcc and g++)
@ 2021-07-14 18:46 Nibbe, Evan E
  2021-07-16 13:02 ` Nick Clifton
  0 siblings, 1 reply; 3+ messages in thread
From: Nibbe, Evan E @ 2021-07-14 18:46 UTC (permalink / raw)
  To: binutils

Currently the ld program got corrupted after I accidentally operated make with root privileges (FreeImage from https://sourceforge.net/projects/freeimage/files/Source%20Distribution/3.18.0/FreeImage3180.zip/download required using sudo make).
How do I fix this problem? Should I just save all my important files somewhere else and reinstall linux on my computer?
Other things I tried:
sudo apt-get install —reinstall build-essential #both before and after getting rid of ld (I then used sudo ln -s in order to make the ld symbolic link in /usr/bin to the version of ld created with that)
sudo apt-get install —reinstall gcc
sudo apt-get ld #failed because it could not find ld
sudo apt-get install ld  #failed because it could not find ld
sudo apt-get install —reinstall ld #failed because it could not find ld
git clone git://sourceware.org/git/binutils-gdb.git #found out from the README files in there that I would need to have a working gcc compiler in order to make a working gcc compiler (I did not find anything in there that would lead me to being able to code without a working gcc compiler)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How do I fix the ld program (the linker for gcc and g++)
  2021-07-14 18:46 How do I fix the ld program (the linker for gcc and g++) Nibbe, Evan E
@ 2021-07-16 13:02 ` Nick Clifton
  2021-07-16 13:35   ` Paul Koning
  0 siblings, 1 reply; 3+ messages in thread
From: Nick Clifton @ 2021-07-16 13:02 UTC (permalink / raw)
  To: Nibbe, Evan E, binutils

Hi Evan,

> Currently the ld program got corrupted after I accidentally operated make with root privileges (FreeImage from 

This is really a question for your distribution's maintainers...

> How do I fix this problem? Should I just save all my important files somewhere else and reinstall linux on my computer ?

Yes.  You cannot rebuild the linker without having a working linker present
in the build system, so reinstalling is the only real option available.

Cheers
   Nick


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How do I fix the ld program (the linker for gcc and g++)
  2021-07-16 13:02 ` Nick Clifton
@ 2021-07-16 13:35   ` Paul Koning
  0 siblings, 0 replies; 3+ messages in thread
From: Paul Koning @ 2021-07-16 13:35 UTC (permalink / raw)
  To: Nick Clifton; +Cc: Nibbe, Evan E, binutils



> On Jul 16, 2021, at 9:02 AM, Nick Clifton via Binutils <binutils@sourceware.org> wrote:
> 
> Hi Evan,
> 
>> Currently the ld program got corrupted after I accidentally operated make with root privileges (FreeImage from 
> 
> This is really a question for your distribution's maintainers...
> 
>> How do I fix this problem? Should I just save all my important files somewhere else and reinstall linux on my computer ?
> 
> Yes.  You cannot rebuild the linker without having a working linker present
> in the build system, so reinstalling is the only real option available.

Reinstalling the package that contains ld (presumably "binutils") would be sufficient if that's the total damage.  But I can't see how "operating make with root privs" would damage ld to begin with.  That raises the question what actually went wrong, and how much else in the system has been damaged by this security violation.  In other words, while wipe and full OS reinstall is a drastic solution, it may be prudent here.

	paul



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-07-16 13:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-14 18:46 How do I fix the ld program (the linker for gcc and g++) Nibbe, Evan E
2021-07-16 13:02 ` Nick Clifton
2021-07-16 13:35   ` Paul Koning

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).