yum安装软件报错:Could not retrieve mirrorlist http://mirrorlist.centos.org/?relea

yum的源出现问题:

下载yum文件,替代原始yum源:

(1)网易yum源:

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.163.com/.help/CentOS7-Base-163.repo

yum clean all //清除缓存

yum makecache //生成缓存

解析:wget -o,使用"-o"参数来指定一个文件名

(2)阿里云yum源:

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

yum clean all

yum makecache

此时发现系统未安装wget :

使用wget命令去下载应用时,提示" wget: command not found"。

rmp包安装

安装包下载地址wget安装包下载:地址https://mirrors.aliyun.com/centos/7/os/x86_64/Packages/https://mirrors.aliyun.com/centos/7/os/x86_64/Packages/

下载完传到centos服务器上:

#安装
rpm -ivh wget-1.14-18.el7_6.1.x86_64.rpm

#核验安装
rpm -qa|grep "wget"

相关推荐
大哥您好4 小时前
QEMU 11.1.2 多架构编译指南(x86_64 / aarch64 / riscv64)
linux·服务器
道满科技5 小时前
Function Calling 参数总出错?只修参数就行
linux·windows·python
Android系统攻城狮6 小时前
Linux Gstreamer深度解析之gst_audio_ring_buffer_prepare_read调用流程与实战(七十四)
linux·运维·服务器·gstreamer音视频·音视频进阶
我科绝伦(Huanhuan Zhou)6 小时前
Linux 通用压力测试脚本合集:磁盘 + 网络
linux·网络·压力测试
Soneswy8 小时前
Linux系统篇--重定向与文件操作命令
linux
有毒的教程8 小时前
Linux底层存储路由配
linux·运维·网络
Linux系统运维工程师_郭主任9 小时前
运维人还在被拒offer?现在能考的,只有 RHCE 10.0。
linux
自养Agent10 小时前
MCP Server Boundary Audit Report
linux·服务器·人工智能·windows·大模型·llm
Coisinier11 小时前
docker命令管理镜像及容器
linux·运维·nginx·docker·容器·操作系统
A心有千千结11 小时前
通过 SSH 反向代理让服务器借用本机网络访问 GitHub 的最佳实践
linux·服务器·网络·git·ssh·github