When executing a compiled file in Linux (. /configure) with collect2: fatal error: cannot find ‘ld’, which is also preceded by gcc: error: unrecognized command line option -V and configure: error: C compiler cannot create executables. When you find that your gcc and the corresponding dependency packages are installed, you still get the error. At this point you look under /usr/bin/ to see if there is an ld. which ld is not found, but you find a file called ld.gold under /usr/bin by running ls -l |grep ld.
Solution:
Copy ld.gold under /usr/bin/ (do not delete the original file) and rename it to ld. You can also create a soft connection.
Re-execute the compilation
Problem found solved!
Brief description.
gcc compiles the source code to .o, then linker links the .o to .so or executable, linker can use ld.bfd, ld.gold or lld.
Read More:
- [Solved] /usr/bin/ld: cannot find crti.o: No such file or directory & /usr/bin/ld: cannot find -lc
- Configure the node environment under Linux, internal/modules/cjs/loader.js:583 throw err; solution
- [Solved] websocket error in Linux service: / lib64 / libc. So. 6: version ` glibc_2.17‘ not found
- [Solved] C++: fatal error: Killed signal terminated program cc1plus
- Nginx Error: Swap file “/etc/nginx/.nginx.conf.swp“ already exists
- [Solved] xtrabackup Error: “Too many open files” (system error number 24)
- Nginx Error: nginx: [emerg] the “ssl“ parameter requires ngx_http_ssl_module in /project/api/nginx.conf:
- [Solved] mongo Startup Error: ERROR: child process failed, exited with error number 1
- [Soled] MTPuTTY error: unable to run putty the system cannot find the specified file
- [Solved] ImportError:lib***.so–cannot open shared object file: No such…(pycharm/clion Error but shell No Error)
- How to Solve insufficent privileges error: Ora-01031
- Es Container Error: too many open files [How to Solve]
- Ubuntu sub process/usr/bin/dpkg returned an error code (1) solution
- Error: linker ` link. Exe ` not found | = note: the system cannot find the specified file.
- ./configure Command Execute error (Centos7 Install erlang)
- AFTER THE GIT SOURCE CODE IS INSTALLED, AN ERROR IS REPORTED /USR/BIN/GIT: NO SUCH FILE OR DIRECTORY
- How to Solve Linux error – rsyncd synchronous error 1
- Docker Run ‘echo core > /proc/sys/kernel/core_pattern‘ Error
- [Solved] Failed to execute/bin/bash: resource temporarily unavailable
- Solve the error report of the find command: paths must precede expression