源码安装nginx报错,找不到gcc,但是实际上gcc是存在的,如下: # ./configure checking for OS + Linux -.el7.x86_64 x86_64 checking for C compiler ... not found ./configure: error: C compiler cc is not found # 尝试找寻gcc # whereis gcc .gz # 尝试指定cc # ./configure --with-cc=/usr/bin/g
报错内容 /tmp/cc7eQyD4.o: In function `main':test.c:(.text+0x51): undefined reference to `sqrt'collect2: ld returned 1 exit status 在编译后面加上-lm gcc -o test test.c -lm
使用google protobuf时,出现错误 /usr/bin/ld: /usr/local/lib/libprotobuf.a(message_lite.o): relocation R_X86_64_32S against `_ZTVN6google8protobuf11MessageLiteE' can not be used when making a shared object; recompile with -fPIC/usr/local/lib/libprotobuf.a: er
运行编译后的程序报错 error while loading shared libraries: lib*.so: cannot open shared object file: No such file or directory -------------------------------------------------------------------------------------------------------------------------------------