服务器安装最新版的 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
评论区