Linux相关(3)Linux下建立Git与GitHub的连接以及安装git时的n个解决问题办法

今天想把本地的一个仓库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
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值