本文介绍: 解决 Failed to search for file: cannot update repoappstream’: Cannot prepare internal mirrorlist: No URLs in mirrorlist。因为Centos 8已经停止维护,所以需要改变镜像。4、在/etc/profile配置系统环境变量。5、让profile文件立即生效。1、查看MySQL服务是否启动。2、查看MySQL运行环境。3、暂停MySQL服务

问题一、解决Linuxbash: mysql: 未找到命令

1、查看MySQL服务是否启动

 systemctl status mysql

2、查看MySQL运行环境

 echo $PATH(可查看所有服务位置

3、暂停MySQL服务

 service MySQL stop

4、在/etc/profile配置系统环境变量

export PATH=$PATH:(MySQL的bin目录)

5、让profile文件立即生效

 source /etc/profile或./etc/profile

抄录于秀_儿

二、文件搜索失败: cannot update repoappstream’: Cannot prepare internal mirrorlist: No URLs in mirrorlist

解决 Failed to search for file: cannot update repoappstream’: Cannot prepare internal mirrorlist: No URLs in mirrorlist
因为Centos 8已经停止维护,所以需要改变镜像

cd /etc/yum.repos.d/

sudo sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*

sudo sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*

抄录于Javier_Ji

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注