解决了sudo ln -s /usr/lib64/libm.so /lib
和ln -s /usr/lib64/libpthread.so /lib
libm.so 在此目录中:/usr/lib64/libm.so libpthread 在此目录中:/usr/lib64/libpthread.so
我试过ln -s /usr/lib/libthread.so /lib64/libpthread.so
了,出现同样的错误,机器需要重启吗?
我在使用 Centos 6.3 在 C 中创建客户端 OPENDMTP 时遇到问题
我的源文件:https ://sourceforge.net/projects/opendmtp/files/client-c/1.2.3/
我安装了: yum groupinstall "Development Tools"
我尝试安装所需的库,但它们已经安装。
尝试:"make dest=linux dmtp"
我得到下一个:
[root@localhost OpenDMTP_client-c_1.2.0]# make dest=linux dmtp
Make tools dirs ...
/bin/mkdir -p ./build_lin/obj
/bin/mkdir -p ./build_lin/obj/tools
/bin/mkdir -p ./build_lin/obj/lib
Make './build_lin/obj/lib/libtools.a' ...
ar rc ./build_lin/obj/lib/libtools.a ./build_lin/obj/tools/checksum.o ./build_lin/obj/tools/base64.o ./build_lin/obj/tools/bintools.o ./build_lin/obj/tools/buffer.o ./build_lin/obj/tools/gpstools.o ./build_lin/obj/tools/strtools.o ./build_lin/obj/tools/utctools.o ./build_lin/obj/tools/threads.o ./build_lin/obj/tools/sockets.o ./build_lin/obj/tools/io.o ./build_lin/obj/tools/comport.o ./build_lin/obj/tools/random.o
ranlib ./build_lin/obj/lib/libtools.a
Make module dirs ...
/bin/mkdir -p ./build_lin/obj
/bin/mkdir -p ./build_lin/obj/modules
/bin/mkdir -p ./build_lin/obj/lib
Make './build_lin/obj/lib/libmodule.a' ...
ar rc ./build_lin/obj/lib/libmodule.a ./build_lin/obj/modules/odometer.o ./build_lin/obj/modules/motion.o ./build_lin/obj/modules/geozone.o
ranlib ./build_lin/obj/lib/libmodule.a
Make base dirs ...
/bin/mkdir -p ./build_lin/obj
/bin/mkdir -p ./build_lin/obj/base
/bin/mkdir -p ./build_lin/obj/lib
Make './build_lin/obj/lib/libbase.a' ...
ar rc ./build_lin/obj/lib/libbase.a ./build_lin/obj/base/mainloop.o ./build_lin/obj/base/propman.o ./build_lin/obj/base/event.o ./build_lin/obj/base/events.o ./build_lin/obj/base/packet.o ./build_lin/obj/base/pqueue.o ./build_lin/obj/base/protocol.o ./build_lin/obj/base/accting.o ./build_lin/obj/base/upload.o
ranlib ./build_lin/obj/lib/libbase.a
make dest=linux XPORT_MEDIA=-DTRANSPORT_MEDIA_SOCKET -f src/custom/custom.mk dmtpd_all
make[1]: Entering directory `/home/centos/Downloads/OpenDMTP_client-c_1.2.0'
Making sample DMTP reference implementation ...
Make dmtp object dirs ...
/bin/mkdir -p ./build_lin/obj/custom
/bin/mkdir -p ./build_lin/obj/custom/linux
/bin/mkdir -p ./build_lin/obj/custom/modules
/bin/mkdir -p ./build_lin/obj/dmtp
Linking 'dmtpd' ...
cc -o ./build_lin/obj/dmtp/dmtpd -Wall -DTARGET_LINUX -DTRANSPORT_MEDIA_SOCKET -DPROTOCOL_THREAD -DGPS_THREAD -Isrc /usr/lib/libpthread.so /usr/lib/libm.so ./build_lin/obj/custom/startup.o ./build_lin/obj/custom/transport.o ./build_lin/obj/custom/log.o ./build_lin/obj/custom/gps.o ./build_lin/obj/custom/gpsmods.o ./build_lin/obj/custom/linux/os.o -L./build_lin/obj/lib -lmodule -lbase -ltools
cc: /usr/lib/libpthread.so: No such file or directory
cc: /usr/lib/libm.so: No such file or directory
make[1]: *** [dmtpd_exe] Error 1
make[1]: Leaving directory `/home/centos/Downloads/OpenDMTP_client-c_1.2.0'
make: *** [dmtp_socket] Error 2