Zea*_*ker 2 git compiler-errors
我想将git安装到一个服务器中,我只是一个没有"sudo"访问权限的用户.所以我不能用yum install git.
我尝试从https://www.kernel.org/pub/software/scm/git/(v2.11.0.tar.gz)和github(v2.3.0.zip)下载源代码.
编译源时发生错误:
imap-send.c: In function ‘setup_curl’:
imap-send.c:1408: error: ‘CURLOPT_USERNAME’ undeclared (first use in this function)
imap-send.c:1408: error: (Each undeclared identifier is reported only once
imap-send.c:1408: error: for each function it appears in.)
imap-send.c:1409: error: ‘CURLOPT_PASSWORD’ undeclared (first use in this function)
imap-send.c:1434: error: ‘CURLOPT_USE_SSL’ undeclared (first use in this function)
imap-send.c:1434: error: ‘CURLUSESSL_TRY’ undeclared (first use in this function)
make: *** [imap-send.o] Error 1
make: *** Waiting for unfinished jobs....
Run Code Online (Sandbox Code Playgroud)
这两个版本给出了相同的错误.我检查了github的源代码并获得了代码的位置,但我无法理解为什么错误发生了.
如果没有管理员权限,我应该如何进入服务器(CentOS).
我自己解决了这个问题.
很明显,问题是由卷曲引起的.
使用which curl看袅袅的正确道路.在我的服务器中,它是:
/home/myname/Programs/Anaconda/bin/curl所以它是anaconda改变了我的卷曲.
git-2.11.0 $ ./configure --with-curl=$/home/myname/Programs/Anaconda/bin/curl
要先设置卷曲路径
git-2.11.0 $ make prefix=/home/myname/path/to/install all
然后再设置
git-2.11.0 $ make install prefix=/home/myname/path/to/install DESTDIR=/home/myname/path/to/install
| 归档时间: |
|
| 查看次数: |
769 次 |
| 最近记录: |