centos 编译libevent_linux无法编译libevent,一直报错,但是我有装openssl

执行完configure后make,报错:

make

make all-recursive

make[1]: Entering directory `/libevent-2.0.21-stable'

Making all in .

make[2]: Entering directory `/libevent-2.0.21-stable'

/bin/bash ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I./compat -I./include -I./include -g -O2 -Wall -fno-strict-aliasing -pthread -MT bufferevent_openssl.lo -MD -MP -MF .deps/bufferevent_openssl.Tpo -c -o bufferevent_openssl.lo bufferevent_openssl.c

libtool: compile: gcc -DHAVE_CONFIG_H -I. -I./compat -I./include -I./include -g -O2 -Wall -fno-strict-aliasing -pthread -MT bufferevent_openssl.lo -MD -MP -MF .deps/bufferevent_openssl.Tpo -c bufferevent_openssl.c -fPIC -DPIC -o .libs/bufferevent_openssl.o

bufferevent_openssl.c: In function 'bio_bufferevent_new':

bufferevent_openssl.c:106:3: error: dereferencing pointer to incomplete type

bufferevent_openssl.c:107:3: error: dereferencing pointer to incomplete type

bufferevent_openssl.c:108:3: error: dereferencing pointer to incomplete type

bufferevent_openssl.c:109:3: error: dereferencing pointer to incomplete type

bufferevent_openssl.c: In function 'bio_bufferevent_free':

bufferevent_openssl.c:119:7: error: dereferencing pointer to incomplete type

bufferevent_openssl.c:120:8: error: dereferencing pointer to incomplete type

bufferevent_openssl.c:120:19: error: dereferencing pointer to incomplete type

bufferevent_openssl.c:121:22: error: dereferencing pointer to incomplete type

bufferevent_openssl.c:122:4: error: dereferencing pointer to incomplete type

bufferevent_openssl.c:123:4: error: dereferencing pointer to incomplete type

bufferevent_openssl.c:124:4: error: dereferencing pointer to incomplete type

bufferevent_openssl.c: In function 'bio_bufferevent_read':

bufferevent_openssl.c:140:8: error: dereferencing pointer to incomplete type

bufferevent_openssl.c:143:33: error: dereferencing pointer to incomplete type

bufferevent_openssl.c: In function 'bio_bufferevent_write':

bufferevent_openssl.c:159:31: error: dereferencing pointer to incomplete type

bufferevent_openssl.c:165:8: error: dereferencing pointer to incomplete type

bufferevent_openssl.c: In function 'bio_bufferevent_ctrl':

bufferevent_openssl.c:191:31: error: dereferencing pointer to incomplete type

bufferevent_openssl.c:196:10: error: dereferencing pointer to incomplete type

bufferevent_openssl.c:199:4: error: dereferencing pointer to incomplete type

bufferevent_openssl.c: At top level:

bufferevent_openssl.c:228:1: error: variable 'methods_bufferevent' has initializer but incomplete type

bufferevent_openssl.c:229:2: warning: excess elements in struct initializer [enabled by default]

bufferevent_openssl.c:229:2: warning: (near initialization for 'methods_bufferevent') [enabled by default]

bufferevent_openssl.c:229:2: warning: excess elements in struct initializer [enabled by default]

bufferevent_openssl.c:229:2: warning: (near initialization for 'methods_bufferevent') [enabled by default]

bufferevent_openssl.c:230:2: warning: excess elements in struct initializer [enabled by default]

bufferevent_openssl.c:230:2: warning: (near initialization for 'methods_bufferevent') [enabled by default]

bufferevent_openssl.c:231:2: warning: excess elements in struct initializer [enabled by default]

bufferevent_openssl.c:231:2: warning: (near initialization for 'methods_bufferevent') [enabled by default]

bufferevent_openssl.c:232:2: warning: excess elements in struct initializer [enabled by default]

bufferevent_openssl.c:232:2: warning: (near initialization for 'methods_bufferevent') [enabled by default]

bufferevent_openssl.c:233:2: warning: excess elements in struct initializer [enabled by default]

bufferevent_openssl.c:233:2: warning: (near initialization for 'methods_bufferevent') [enabled by default]

bufferevent_openssl.c:234:2: warning: excess elements in struct initializer [enabled by default]

bufferevent_openssl.c:234:2: warning: (near initialization for 'methods_bufferevent') [enabled by default]

bufferevent_openssl.c:235:2: warning: excess elements in struct initializer [enabled by default]

bufferevent_openssl.c:235:2: warning: (near initialization for 'methods_bufferevent') [enabled by default]

bufferevent_openssl.c:236:2: warning: excess elements in struct initializer [enabled by default]

bufferevent_openssl.c:236:2: warning: (near initialization for 'methods_bufferevent') [enabled by default]

bufferevent_openssl.c:237:2: warning: excess elements in struct initializer [enabled by default]

bufferevent_openssl.c:237:2: warning: (near initialization for 'methods_bufferevent') [enabled by default]

bufferevent_openssl.c: In function 'BIO_new_bufferevent':

bufferevent_openssl.c:257:8: error: dereferencing pointer to incomplete type

bufferevent_openssl.c:258:8: error: dereferencing pointer to incomplete type

bufferevent_openssl.c:259:8: error: dereferencing pointer to incomplete type

查看106行文件,是BIO *h

static int

bio_bufferevent_new(BIO *b)

{

b->init = 0;

b->num = -1;

b->ptr = NULL; /* We'll be putting the bufferevent in this field.*/

b->flags = 0;

return 1;

}

但是我的/usr/include/openssl目录下执行ls,发现是存在bio.h

执行openssl version -a:

OpenSSL 1.1.0g 2 Nov 2017

built on: reproducible build, date unspecified

platform: dist

compiler: cc -DNDEBUG -DOPENSSL_NO_DYNAMIC_ENGINE -DOPENSSLDIR="\"/usr/local/ssl\"" -DENGINESDIR="\"/usr/local/lib/engines-1.1\""

OPENSSLDIR: "/usr/local/ssl"

ENGINESDIR: "/usr/local/lib/engines-1.1"

目前就不知道怎么回事了

编译环境是linux,各位给个提示,怎么查问题?

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
提供的源码资源涵盖了安卓应用、小程序、Python应用和Java应用等多个领域,每个领域都包含了丰富的实例和项目。这些源码都是基于各自平台的最新技术和标准编写,确保了在对应环境下能够无缝运行。同时,源码中配备了详细的注释和文档,帮助用户快速理解代码结构和实现逻辑。 适用人群: 这些源码资源特别适合大学生群体。无论你是计算机相关专业的学生,还是对其他领域编程感兴趣的学生,这些资源都能为你提供宝贵的学习和实践机会。通过学习和运行这些源码,你可以掌握各平台开发的基础知识,提升编程能力和项目实战经验。 使用场景及目标: 在学习阶段,你可以利用这些源码资源进行课程实践、课外项目或毕业设计。通过分析和运行源码,你将深入了解各平台开发的技术细节和最佳实践,逐步培养起自己的项目开发和问题解决能力。此外,在求职或创业过程中,具备跨平台开发能力的大学生将更具竞争力。 其他说明: 为了确保源码资源的可运行性和易用性,特别注意了以下几点:首先,每份源码都提供了详细的运行环境和依赖说明,确保用户能够轻松搭建起开发环境;其次,源码中的注释和文档都非常完善,方便用户快速上手和理解代码;最后,我会定期更新这些源码资源,以适应各平台技术的最新发展和市场需求。
编译 Zabbix、PostgreSQL 和 Nginx 可以分为以下几个步骤: 1. 安基础依赖 ```shell yum install -y gcc make wget net-snmp-devel libcurl-devel libxml2-devel libevent-devel openssl-devel libpng-devel libjpeg-devel libuuid-devel ``` 2. 安 PostgreSQL ```shell wget https://ftp.postgresql.org/pub/source/v13.4/postgresql-13.4.tar.gz tar -zxvf postgresql-13.4.tar.gz cd postgresql-13.4 ./configure --prefix=/usr/local/pgsql --without-readline make && make install ``` 3. 初始化 PostgreSQL ```shell cd /usr/local/pgsql/bin ./initdb -D /usr/local/pgsql/data ``` 4. 启动 PostgreSQL ```shell cd /usr/local/pgsql/bin ./pg_ctl -D /usr/local/pgsql/data -l logfile start ``` 5. 创建 Zabbix 数据库及用户 ```shell cd /usr/local/pgsql/bin ./createdb -U postgres zabbix ./createuser -U postgres -P zabbix ``` 6. 安 Zabbix ```shell wget https://cdn.zabbix.com/zabbix/sources/stable/5.4/zabbix-5.4.4.tar.gz tar -zxvf zabbix-5.4.4.tar.gz cd zabbix-5.4.4 ./configure --prefix=/usr/local/zabbix --enable-server --enable-agent --with-postgresql --with-net-snmp --with-libcurl --with-libxml2 --with-openssl --with-libpng --with-jpeg --with-uuid make && make install ``` 7. 导入 Zabbix 数据库 ```shell cd /usr/local/zabbix/share/zabbix/database/postgresql psql -U zabbix -d zabbix -f schema.sql psql -U zabbix -d zabbix -f images.sql psql -U zabbix -d zabbix -f data.sql ``` 8. 配置 Zabbix ```shell cp /usr/local/zabbix/etc/zabbix_server.conf.example /usr/local/zabbix/etc/zabbix_server.conf vi /usr/local/zabbix/etc/zabbix_server.conf ``` 修改以下内容: ```ini DBName=zabbix DBUser=zabbix DBPassword=<zabbix用户密码> DBHost=localhost ``` 9. 启动 Zabbix Server 和 Agent ```shell /usr/local/zabbix/sbin/zabbix_server /usr/local/zabbix/sbin/zabbix_agentd ``` 10. 安 Nginx ```shell wget https://nginx.org/download/nginx-1.20.1.tar.gz tar -zxvf nginx-1.20.1.tar.gz cd nginx-1.20.1 ./configure --prefix=/usr/local/nginx --with-http_ssl_module --with-http_stub_status_module --with-pcre make && make install ``` 11. 配置 Nginx ```shell cp /usr/local/zabbix/frontends/php/*.php /usr/local/nginx/html/ vi /usr/local/nginx/conf/nginx.conf ``` 添加以下内容: ```ini server { listen 80; server_name localhost; location / { root /usr/local/nginx/html; index index.php index.html index.htm; } location ~ \.php$ { root /usr/local/nginx/html; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } } ``` 12. 启动 Nginx ```shell /usr/local/nginx/sbin/nginx ``` 至此,Zabbix、PostgreSQL 和 Nginx 的编译配置已完成。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值