自由屋推书网—热门的小说推荐平台!

你的位置: 首页 > linux

安装宝塔面板编译云锁模块无法编译解决方法

2022-03-29 13:39:29

安装的宝塔面板,想编译云锁模块。怎么也编译不上,提示这个。原来是pcra在做怪。修改到pcre安装目录就可以了。问题完美解决。记录一下

报错信息如下:

make -f objs/Makefile
make[1]: Entering directory `/work/tengine-2.3.2'
cd /pcre-8.43 \
&& if [ -f Makefile ]; then make distclean; fi \
&& CC="cc" CFLAGS="-O2 -fomit-frame-pointer -pipe " \
./configure --disable-shared 
/bin/sh: line 0: cd: /pcre-8.43: No such file or directory
make[1]: *** [/pcre-8.43/Makefile] Error 1
make[1]: Leaving directory `/work/tengine-2.3.2'
make: *** [build] Error 2

编译信息参数:

./configure --user=www --group=www --prefix=/www/server/nginx --add-module=/www/server/nginx/src/ngx_devel_kit --add-module=/www/server/nginx/src/lua_nginx_module --add-module=/www/server/nginx/src/ngx_cache_purge --add-module=/www/server/nginx/src/nginx-sticky-module --with-openssl=/www/server/nginx/src/openssl --with-pcre=/pcre-8.43 --with-http_v2_module --with-stream --with-stream_ssl_module --with-http_stub_status_module --with-http_ssl_module --with-http_image_filter_module --with-http_gzip_static_module --with-http_gunzip_module --with-ipv6 --with-http_sub_module --with-http_flv_module --with-http_addition_module --with-http_realip_module --with-http_mp4_module --with-ld-opt=-Wl,-E --with-cc-opt=-Wno-error --with-ld-opt=-ljemalloc --add-module=/work/nginx-plugin-master

这里看报错信息发现一个参数是pcre的地址,由错误 cd: /pcre-8.43: No such file or directory 可以看出来是,应该是没有找到pcre-8.43的路径,看一下磁盘根目录,没有发现pcre安装的目录,凭我感觉,宝塔nginx已经安装了,应该存在pcre-8.43目录。于是我在宝塔的安装目录下找到了。

找到了pcre就不用重新安装一个,直接修改编译参数的 --with-pcre=/pcre-8.43 改为 --with-pcre=/www/server/nginx/src/pcre-8.43 重新 ./configure 和 make

编译成功,替换掉原来的nginx 重启一下就可以了。

编辑推荐

热门小说