首页 > 系统 > CentOS > 正文

【CentOS7】下解决yum install mysql-server没有可用包的问题

2024-06-28 16:05:08
字体:
来源:转载
供稿:网友
[azq@localhost ~]$ sudo yum install MySQL-server已加载插件:fastestmirror, langpacksLoading mirror speeds from cached hostfile * base: mirrors.163.com * extras: mirrors.163.com * updates: centos.ustc.edu.cn没有可用软件包 mysql-server。错误:无须任何处理[plain] view plaincopy在CODE上查看代码片派生到我的代码片 # wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm  --%20 http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm 

正在解析主机%20repo.mysql.com%20(repo.mysql.com)...%2023.4.241.142正在连接%20repo.mysql.com%20(repo.mysql.com)|23.4.241.142|:80...%20已连接。已发出%20HTTP%20请求,正在等待回应...%20200%20OK长度:6140%20(6.0K)%20[application/x-redhat-package-manager]正在保存至:%20“mysql-community-release-el7-5.noarch.rpm”100%[======================================>]%206,140%20 %20 %20 %20--.-K/s%20用时%200s%20 %20 %20 (467%20MB/s)%20-%20已保存%20“MySQL-community-release-el7-5.noarch.rpm”%20[6140/6140])

 

[plain] view%20plaincopy派生到我的代码片 # ls   

mysql-community-release-el7-5.noarch.rpm[plain] view%20plaincopy派生到我的代码片 # rpm -ivh mysql-community-release-el7-5.noarch.rpm  准备中...%20 %20 %20 %20 %20 %20 %20 %20 %20 %20 %20 %20 %20 #################################%20[100%]正在升级/安装...1:mysql-community-release-el7-5%20 %20 #################################%20[100%]

ps:如果出现can't%20create%20transaction%20lock%20on%20/var/lib/rpm/.rpm.lock%20错误

错误原因:权限问题解决方法:在终端输入“su”和密码,登录root,以root身份登录就不会有提示

 

[plain] view%20plaincopy派生到我的代码片 # ls -1 /etc/yum.repos.d/mysql-community*  /etc/yum.repos.d/mysql-community.repo 

/etc/yum.repos.d/mysql-community-source.repo

 

[plain] view%20plaincopy派生到我的代码片 # yum install mysql-server  
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表