【发布时间】:2019-07-18 06:49:59
【问题描述】:
我刚刚在托管公司创建了 CentOS 7。
我需要安装一个依赖于 MySQL-python 包的应用程序。
我尝试安装该软件包,但它不可用:
root@vps [/var/frappe]# yum install MySQL-python
Loaded plugins: fastestmirror, universal-hooks
Loading mirror speeds from cached hostfile
* EA4: 208.100.0.204
* base: ftpmirror.your.org
* epel: mirror.steadfastnet.com
* extras: ftpmirror.your.org
* ius: muug.ca
* updates: ftpmirror.your.org
No package MySQL-python available.
Error: Nothing to do
root@vps [/var/frappe]#
为什么我不能安装它?一些解决方法?
编辑:
/etc/yum.conf
[main]
exclude=courier* dovecot* exim* filesystem httpd* mod_ssl* mydns* mysql* nsd* p0f php* proftpd* pure-ftpd* spamassassin* squirrelmail*
tolerant=1
errorlevel=1
cachedir=/var/cache/yum/$basearch/$releasever
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
installonly_limit=5
bugtracker_url=http://bugs.centos.org/set_project.php?project_id=23&ref=http://bugs.centos.org/bug_report_page.php?category=yum
distroverpkg=centos-release
# This is the default, if you make this bigger yum won't see if the metadata
# is newer on the remote and so you'll "gain" the bandwidth of not having to
# download the new metadata and "pay" for it by yum not having correct
# information.
# It is esp. important, to have correct metadata, for distributions like
# Fedora which don't keep old packages around. If you don't like this checking
# interupting your command line usage, it's much better to have something
# manually check the metadata once an hour (yum-updatesd will do this).
# metadata_expire=90m
# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d
【问题讨论】:
-
试试
yum update。检查镜像实际上正在更新。甚至docker run centos:7 yum search MySQL-python也为我找到了它。所以托管/默认回购问题。 -
它也不起作用......什么是docker.....?
-
什么是 'it' - 'yum update' 或 'checking the mirrors' ?而不是像“没有工作”这样无意义的陈述显示实际结果/观察结果,如果需要,显示预期结果?在这种情况下,docker 是一种运行相当原始的操作系统的方法,用于演示目的。
-
我已经运行了“yum update”...我不知道如何检查镜像。假设所有存储库都配置良好。
-
鉴于安装包失败,我怀疑它没有正确配置。将您在问题中隐藏的 url 与公共 centos 的目录(如mirror.centos.org/centos-7/7)进行比较,或设置您的镜像like this answer,然后重试。或联系您的托管服务提供商,以获取其服务中断所带来的支持。
标签: mysql centos7 mysql-python