- 我的博客:www.shishangguan.net
用的centos6.4中自帶的git,版本為1.7.1,配置好github的sshkey后,clone下來的項目無法提交,提示:
fatal: Unable to find remote helper for 'https'
網上查閱后,參照http://stackoverflow.com/questions/8329485/git-clone-fatal-unable-to-find-remote-helper-for-https發現是由於安裝時少安裝cur-devell模塊的原因,需要重新編譯安裝。
於是安裝curl-devel:
$ yum install curl-devel $ # cd to wherever the source for git is $ cd /usr/local/src/git-1.7.9 $ ./configure $ make $ make install
但make的時候發生警告:
注意:如果機器只安裝了libcurl,而沒有安裝libcurl-devel包,是沒法進行編譯的。他們兩個區別是:
libxxx相當於只有動態庫的部分 只能被編譯好的程序運行的時候鏈接,但缺少部分頭文件的源代碼,所以不能編譯。如果是編譯為動態庫,需要libxxx-devel里邊的頭文件,如果要編 譯為靜態的則需要里邊的頭文件和c文件都需要,所以libxxx-devel對要編譯一個程序的時候是必不可少的。看考http://stackoverflow.com/questions/2358801/what-are-devel-packages
command not found:curl-config
去/usr/bin目錄和/usr/local/bin等常見目錄尋找后均沒發現,使用locate命令尋找:
[money@money study]$ locate curl-config /opt/vagrant/embedded/bin/curl-config /opt/vagrant/embedded/share/man/man1/curl-config.1
才發現原來我這個版本的是在opt目錄下,於是在/usr/bin目錄下做了個軟鏈接,然后編譯就通過了。
再次執行最上邊的安裝步驟,安裝成功並且上傳沒有出現問題。