树莓派实现人脸识别(翔云方案)

树莓派实现人脸识别(翔云方案)

详细请点这里

.libcurl简介简介

libcurl是一个跨平台的网络协议库,支持http, https, ftp, gopher, telnet, dict, file, 和ldap 协议。libcurl同样支持HTTPS证书授权,HTTP POST, HTTP PUT, FTP 上传, HTTP基本表单上传,代理,cookies,和用户认证。

.相关库下载

1.libcurl的官网 http://curl.haxx.se/

2.库下载 wget https://github.com/curl/curl/releases/tag/curl-7_71_1
3. wget http://www.openssl.org/source/openssl-1.1.0e.tar.gz 安装OpenSSL库

.环境搭建

1.libcurl配置

tar -xjf curl-7.71.1.tar.bz2
cd curl-7.71.1/
./configure --prefix=$HOME/curl --with-ssl
make -j4
make install

2.openssl配置

tar -xzf openssl-1.1.1i.tar.gz
cd openssl-1.1.1i/
./config
make -j4
sudo make install
.编译时报错

gcc democar.c -I ./curl-7.71.1/_install/include/ -L ./curl-7.71.1/_install/lib/ -lcurl

/curl-7.71.1/_install/lib//libcurl.so: undefined reference to `SSL_CTX_set_keylog_callback@OPENSSL_1_1_1'
./curl-7.71.1/_install/lib//libcurl.so: undefined reference to `SSL_CTX_set_post_handshake_auth@OPENSSL_1_1_1'
./curl-7.71.1/_install/lib//libcurl.so: undefined reference to `SSL_CTX_set_ciphersuites@OPENSSL_1_1_1'

解决方法

指令上加上-lssl -lcrypto
gcc democar.c -I ./curl-7.71.1/_install/include/ -L ./curl-7.71.1/_install/lib/ -lcurl -lssl -lcrypto

运行报错

openssl: /usr/lib/x86_64-linux-gnu/libssl.so.1.1: version OPENSSL_1_1_1’ not found (required by openssl)

fatal error:curl/curl.h:No such file or directory

解决方法

export LD_LIBRARY_PATH=/usr/local/lib
sudo vi /etc/profile
//最后一行加入
export C_INCLUDE_PATH=$C_INCLUDE_PATH:$HOME/curl/include
export LIBRARY_PATH=$LIBRARY_PATH:$HOME/curl/lib
//立即生效
source /etc/profile

最后运行代码 + -lcurl

你可能感兴趣的:(树莓派,树莓派人脸识别)