centos6 报错yum [Errno 14] PYCURL ERROR 22

caid

分类: 操作系统、知识小库、经验总结 1562 2

1.1 问题描述

在更新git的时候,需要安装zlib,但是我的系统是centos6.5的,在使用

yum install zlib

命令的时候,发现报错了,后来通过网上查找相关资料才知道,CentoS 6在2020年11月30日就停止维护了。

所以报了下面这个错误:

yum [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
后来经过网上找帖子,最后终于得到了解决。

1.2 解决方法

  1. 首先修改文件:/etc/yum/pluginconf.d/fastestmirror.conf  将该文件中enable改为0.
  2. 执行命令,更新系统的yum源:

wget -O /etc/yum.repos.d/CentOS-Base.repo http://allen-hz-bucket.oss-cn-hangzhou.aliyuncs.com/centos/Centos-6-Vault-Official.repo

wget -O /etc/yum.repos.d/CentOS-Base.repo http://allen-hz-bucket.oss-cn-hangzhou.aliyuncs.com/centos/Centos-6-Vault-Aliyun.repo

3. 清除缓存

yum clean metadata

完美解决。

2.1 问题描述

在安装vue-aplayer时,执行以下命令:

npm install @moefe/vue-aplayer --save

报了错误,报错信息如下:

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass@4.14.1 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass@4.14.1 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2021-02-20T16_15_28_823Z-debug.log

这个问题其实解决起来比较简单,具体过程如下。

2.2 解决方法

在执行命令的时候,在命令后面添加参数:--unsafe-perm --save-dev

即就是:

npm install @moefe/vue-aplayer --save --unsafe-perm --save-dev

同样,问题完美解决。

  • 5人 Love
  • 1人 Haha
  • 0人 Wow
  • 0人 Sad
  • 0人 Angry
Centos、异常处理

作者简介: caid

共 2 条评论关于 “centos6 报错yum [Errno 14] PYCURL ERROR 22”

Loading...