linux下交叉编译lighttpd以及pcre

发布于 2022-09-07 20:21:31 字数 676 浏览 16 评论 0

1、官网下载了lighttpd-1.4.49以及pcre.8.38
2、编译pcre.8.38

./configure --host=arm-gcc
mark

3、编译lighttpd.1.4.49

./configure --host=arm --with-openssl 
make
make的时候报错
/usr/local/lib/libpcre.so:could not read symbols: File in wrong format
然后我将makefile中的关于pcre的路径全部改了,但是还是报这样的错误,
这个lighttpd改如何交叉编译呢,编译的时候我怎么指定pcre的目录呢?
(pcre我不能make install,公司服务器,没有权限)


clipboard.png

clipboard.png

clipboard.png

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

青衫负雪 2022-09-14 20:21:31

来自 http://www.ridgesolutions.ie/...

编译 pcre

cd /home/youruser
mkdir buid_pcre
cd build_pcre

wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.21.tar.gz
tar -xzf pcre-8.21.tar.gz

cd pcre-8.21

./configure --host=arm-linux-gnueabi CC=arm-linux-gnueabi-gcc \
    AR=arm-linux-gnueabi-ar STRIP=arm-linux-gnueabi-strip \
    RANLIB=arm-linux-gnueabi-ranlib \
    --prefix=/home/youruser/build_lighttpd/build_pcre/_install

make
make install

编译 lighttpd

cd /home/youruser
mkdir build_lighttpd
cd build_lighttpd

wget http://download.lighttpd.net/lighttpd/releases-1.4.x/lighttpd-1.4.32.tar.gz

tar -zxvf lighttpd-1.4.32.tar.gz

cd lighttpd-1.4.32

./configure -prefix=/home/youruser/build_lighttpd/_install \ 
    -host=arm-linux-gnueabi CC=arm-linux-gnueabi-gcc \
    RANLIB=arm-linux-gnueabi-ranlib STRIP=arm-linux-gnueabi-strip\
    --enable-shared --without-mysql --without-zlib --without-bzip2 \
    --disable-ipv6 \
    PCRECONFIG=/home/youruser/build_lighttpd/build_pcre/_install/bin/pcre-config \
    PCRE_LIB=/home/youruser/build_lighttpd/build_pcre/_install/lib/libpcre.a \
    CFLAGS="$CFLAGS -DHAVE_PCRE_H=1 -DHAVE_LIBPCRE=1 -I/home/youruser/build_lighttpd/build_pcre/_install/include"

make
make install
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文