解决编译thrift时报错的问题

本文主要介绍了在编译Thrift时遇到的两个错误:在make时和make install时的报错。针对错误1,文章指出在执行make之前需要配置参数,如使用'./configure --prefix=/usr/local/ --with-php=no --with-boost=/usr/local CXXFLAGS="-g -O2"'。接着再执行make和make install以解决mkdir权限问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

错误1(在make时报错):

make[4]: Entering directory `/home/yantze/dl/thrift/lib/cpp/test'
Makefile:1189: gen-cpp/.deps/ChildService.Plo: No such file or directory
Makefile:1190: gen-cpp/.deps/DebugProtoTest_types.Plo: No such file or directory
Makefile:1191: gen-cpp/.deps/EmptyService.Plo: No such file or directory
Makefile:1192: gen-cpp/.deps/EnumTest_types.Plo: No such file or directory
Makefile:1193: gen-cpp/.deps/OptionalRequiredTest_types.Plo: No such file or directory
Makefile:1194: gen-cpp/.deps/ParentService.Plo: No such file or directory
Makefile:1195: gen-cpp/.deps/Recursive_types.Plo: No such file or directory
Makefile:1196: gen-cpp/.deps/ThriftTest_constants.Plo: No such file or directory
Makefile:1197: gen-cpp/.deps/ThriftTest_types.Plo: No such file or directory
Makefile:1198: gen-cpp/.deps/TypedefTest_types.Plo: No such file or directory
Makefile:1199: gen-cpp/.deps/proc_types.Plo: No such file or directory
make[4]: *** No rule to make target `gen-cpp/.deps/proc_types.Plo'.  Stop.

错误2(在make install时报错):

mkdir: /usr/lib/php/Thrift: Operation not permitted


先这样configure

./configure --prefix=/usr/local/ --with-php=no --with-boost=/usr/local CXXFLAGS="-g -O2"


然后再make,make install


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值