How do I fix the ld program (the linker for gcc and g++)

Nibbe, Evan E een180000@utdallas.edu
Wed Jul 14 18:46:41 GMT 2021


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)


More information about the Binutils mailing list