侧边栏壁纸
  • 累计撰写 218 篇文章
  • 累计创建 59 个标签
  • 累计收到 5 条评论

编译安装最新版本的 git 报 CURLOPT_LOGIN_OPTIONS 错误

barwe
2022-03-31 / 0 评论 / 1 点赞 / 1,157 阅读 / 528 字
温馨提示:
本文最后更新于 2022-04-03,若内容或图片失效,请留言反馈。部分素材来自网络,若不小心影响到您的利益,请联系我们删除。

服务器安装最新版的 git 遇错:

imap-send.c: In function ‘setup_curl’:
imap-send.c:1420:26: error: ‘CURLOPT_LOGIN_OPTIONS’ undeclared (first use in this function)
   curl_easy_setopt(curl, CURLOPT_LOGIN_OPTIONS, auth.buf);
                          ^
imap-send.c:1420:26: note: each undeclared identifier is reported only once for each function it appears in
make: *** [imap-send.o] Error 1

fix: 用 --with-curl 指定 curl 的位置即可。

$ whereis curl
$ make configure
$ ./configure --prefix=/usr/local/git --with-curl=/usr/bin/curl
$ make
$ make install
$ echo "export PATH=$PATH:/usr/local/git/bin" >> /etc/bashrc
$ source /etc/bashrc
1

评论区