/usr/local/lib/libcurl.so.4:C中没有可用的版本信息(myproject要求)

时间:2018-12-28 01:24:00

标签: c

  

/usr/local/lib/libcurl.so.4:无可用的版本信息(/ home / ubuntu / CLionProjects / DailyCode / CCodes / cmake-build-debug / CCodes所需)

我已经安装了curly并检查了其版本,但是当我运行此项目时,它总是警告我该错误。但是它仍然可以工作,如何解决这个问题?

ubuntu@shan-android:~$ curl --version
curl 7.63.0 (x86_64-pc-linux-gnu) libcurl/7.63.0 OpenSSL/1.1.0g
Release-Date: 2018-12-12
Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp 
Features: AsynchDNS IPv6 Largefile NTLM NTLM_WB SSL TLS-SRP UnixSockets HTTPS-proxy 

/home/ubuntu/CLionProjects/DailyCode/CCodes/cmake-build-debug/CCodes
/home/ubuntu/CLionProjects/DailyCode/CCodes/cmake-build-debug/CCodes: /usr/local/lib/libcurl.so.4: no version information available (required by /home/ubuntu/CLionProjects/DailyCode/CCodes/cmake-build-debug/CCodes)

//这是我的核心代码,它没有特殊要求,很容易测试curl,并且代码正确

void test_post_method(){     int nCode = -1;

char *ip = "220.181.57.216";
char *url_path = NULL;
int port = 80;
char *user = "USER";//no use 
char *pwd = "PWD";//no use 
int format = FORMAT_JSON;
st_curl_params curl_params;
curl_init_params(&curl_params, ip, url_path, port, user, pwd, format);


st_curl_rec curl_rec;


int method = METHOD_GET;

char *msg = "{\"UserName\":\"user\",\"UserPwd\":\"pwd\"}";//no use 
CURL *curl = NULL;
curl = curl_init_resource();
nCode = send_msg(curl, &curl_params, "", method, &curl_rec);
DPRINT("post:\n%s\nsize:%d\n", curl_rec.rec, curl_rec.len);
curl_release_resource(curl);

}

0 个答案:

没有答案