Tag Archives: PHDcand2-2

[Solved] /usr/bin/ld: cannot find crti.o: No such file or directory & /usr/bin/ld: cannot find -lc

Such an error occurred when running./configure. Here is the solution.

Problem description

Environmental Science:

ubuntu 16.04

In operation:

wget -q http://pyyaml.org/download/libyaml/yaml-0.1.7.tar.gz \
      && sudo tar xvf yaml-0.1.7.tar.gz -C /usr/local \
      && cd /usr/local/yaml-0.1.7 \
      && sudo ./configure \

I made a mistake and said:

configure: error: C compiler cannot create executables

Solution

1. Confused period

Take this error message to check,

configure: error: C compiler cannot create executables https://stackoverflow.com/questions/10357804/configure-error-c-compiler-cannot-create-executableshow to fix configure: error: C compiler cannot create executables https://askubuntu.com/questions/647583/how-to-fix-configure-error-c-compiler-cannot-create-executables

There is no solution at all

2. Find a solution

Therefore, we can only continue to study and find that we can check config. Log , go in and check carefully, and find the following errors:

/usr/bin/ld: cannot find crt1.o: No such file or directory
/usr/bin/ld: cannot find crti.o: No such file or directory
/usr/bin/ld: cannot find -lc
/usr/bin/ld: cannot find crtn.o: No such file or directory
collect2: error: ld returned 1 exit status

Then Find /usr/bin/ld: cannot find crti.o: No such file or directory
Find the Below:
cannot find crti.o: No such file or directory https://askubuntu.com/questions/251978/cannot-find-crti-o-no-such-file-or-directory Finally found the right one for my scene:.
crti.o not found: no such file or directory https://qastack.cn/ubuntu/251978/cannot-find-crti-o-no-such-file-or-directory /usr/bin/ld: cannot find -l* The solution to the error …… https://www.huaweicloud.com/articles/7a0fa982b8037ab67800648c5beaf69a.html cpp: usr/bin/ld: cannot find -l<nameOfTheLibrary> https://stackoverflow.com/questions/30600978/cpp-usr-bin-ld-cannot-find-lnameofthelibrary /usr/bin/ld: cannot find -lxxx solutionhttps://www.cnblogs.com/zhming26/p/6164131.html
3、Specific solutions
Run.

sudo apt-get install libc6-dev

Then run configure again.

Summary

above. Still need to go through some twists and turns. No problem.