今天想把本地的一个仓库push到GitHub的时候出错了,本以为是个小错,结果折腾了老半天,为了防止下次再出现这种问题,我把几个有用的博客贴在这里。
第一个:
Linux下建立Git与GitHub的连接:https://www.cnblogs.com/woider/p/6533709.html
第二个:
建立连接后push本地库的时候报错:src refspec master does not match any…
解决方案:https://www.jianshu.com/p/e1f440a9f313
第三个:
用过第二个方法后又报出一个错误:fatal: remote origin already exists
解决方案:https://www.jianshu.com/p/3380ec281729
第四个:
又一个新错误:fatal: HTTP request failed…
解决方案:https://blog.51cto.com/853056088/2286307
第五个:
按照解决方法四,我开始了漫长的安装 git 2.2.1的过程,在[root@localhost git-2.2.1]# wget https://www.kernel.org/pub/software/scm/git/git-2.8.1.tar.gz
中的错误:
usr/bin/perl Makefile.PL PREFIX=’/usr/local/git’ ‘’ --localedir=’/usr/local/git/share/locale’
Can’t locate ExtUtils/MakeMaker.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at Makefile.PL line 3.
BEGIN failed–compilation aborted at Makefile.PL line 3.
make[1]: *** [perl.mak] Error 2
make: *** [perl/perl.mak] Error 2
解决方法:
[root@localhost git-2.2.1]# yum install perl-ExtUtils-MakeMaker package
第六个:
在安装到[root@localhost git-2.2.1]# make configure
出错,显示错误:
make configure
GEN configure
/bin/sh: autoconf: command not found
make: *** [configure] Error 127
解决方法:
[root@localhost git-2.2.1]# yum install autoconf
第七个:
在安装到[root@localhost git-2.2.1]# make all doc
出错。
显示:
BEGIN failed–compilation aborted at Makefile.PL line 3.
make[1]: *** [perl.mak] Error 2
make: *** [perl/perl.mak] Error 2
解决方案:[root@localhost git-2.2.1]# yum install perl-ExtUtils-MakeMaker package.
第八个:
在安装到[root@localhost git-2.2.1]# make all doc
出错。
显示:
- tclsh failed; using unoptimized loading
解决方案:[root@localhost git-2.2.1]# yum install tcl build-essential tk gettext
第9个:
在安装到[root@localhost git-2.2.1]# make all doc
出错。显示:
asciidoc: command not found
make[1]: *** [git-add.html] Error 127
make[1]: Leaving directory `/opt/git-master/Documentation’
make: *** [doc] Error 2
解决方案:安装asciidoc
[root@localhost git-2.2.1]#cd /usr/local/src
[root@localhost git-2.2.1]# wget https://managedway.dl.sourceforge.net/project/asciidoc/asciidoc/8.6.9/asciidoc-8.6.9.tar.gz
tar zxf asciidoc-8.6.9.tar.gz
[root@localhost git-2.2.1]# cd asciidoc-8.6.9
[root@localhost git-2.2.1]# ./configure [root@localhost git-2.2.1]# make install
第10个:
在安装到[root@localhost git-2.2.1]# make all doc
出错。显示:
XSLTPROC user-manual.html
http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl:1: parser error : Document is empty
^
http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl:1: parser error : Start tag expected, ‘<’ not found
^
compilation error: file docbook.xsl line 3 element import
xsl:import : unable to load http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl
make[1]: *** [user-manual.html] Error 5
make[1]: Leaving directory `/opt/git-master/Documentation’
make: *** [doc] Error 2
解决方法:
XSLTPROC user-manual.html时报错,只要一大写 瞬间啥都不认识了
按照惯例:[root@localhost git-2.2.1]# yum search XSLTPROC
显示:
[root@localhost git-2.2.1]# yum search XSLTPROC
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.btte.net
* extras: mirrors.btte.net
* updates: mirrors.163.com
============================== Matched: XSLTPROC ===============================
libxslt.x86_64 : Library providing the Gnome XSLT engine
安装:[root@localhost git-2.2.1]# yum install libxslt.x86_64 -y
第11个:
在安装到[root@localhost git-2.2.1]# make all doc
出错。显示:
解决方法:
[root@localhost git-2.2.1]#yum install xmlto