报错error: The requested URL returned error: 401 Unauthorized while accessing 而在自己的机器的时候木有问题,第一反应就是环境的问题,看了一下公司的环境和自己的环境差异,而在一开始就报错,应该就是git或者git的运行环境问题,自己的使用的os的版本是7.1.X的,而公司的centos还是6.5的,6.5的默认的git的版本是1.7.1的,于是开始升级git 1、下载2.2.1的版本的git wget https://github.com/git/git/archive/v2.2.1.tar.gz 2、解压缩 tar zxvf v2.2.1.tar.gz 3、配置到环境 ># cd git-2.2.1 ># make configure ># ./configure --prefix=/usr/local/git --with-iconv=/usr/local/libiconv ># make all doc ># make install install-doc install-html ># echo "export PATH=$PATH:/usr/local/git/bin" >> /etc/bashrc ># source /etc/bashrc 有部分人在执行make all doc的时候会报错, 报错内容如下: usr/bin/perl Makefile.PL PREFIX='/usr/local/git' INSTALL_BASE='' --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 这时,需要安装一下 yum install perl-ExtUtils-MakeMaker -y yum install curlcurl-develzlib-developenssl-develperlcpioexpat-develgettext-devel -y (责任编辑:好模板) |