Binary compilation and installation /usr/bin/ld: cannot find -latomic error troubleshooting ideas

The content of the error is as follows

/usr/bin/ld: cannot find -latomic
collect2: error: ld returned 1 exit status
make: *** [Makefile:228: redis-server] Error 1

insert image description here

Troubleshooting process

/usr/bin/ld: cannot find -latomicMainly observe the content of this error report. Generally, this kind of error is caused by the lack of some function library files. When compiling different software, the error report is also different. The same must have this sentence: /usr/bin/ld: cannot find.

There are several common errors:
/usr/bin/ld: cannot find -lc
/usr/bin/ld: cannot find -lltdl
/usr/bin/ld: cannot find –lXtst
/usr/bin/ld: cannot find -latomic
where the characters after -l represent the library file name, as in the above example: libc.so, libltdl.so, libXtst.so, libatomic.so.
The naming rule is: lib+library name (ie xxx)+.so.

The solution is as follows: use yum to install the missing library.

yum -y install libatomic-dev

Guess you like

Origin blog.csdn.net/weixin_44953658/article/details/123683716