【2022最新】yum -y install nginx nothing to do (装epel-release也没用的原因)

如果你用尽网上各种安装 yum nginx 的文章,却一直提示 Nothing to do,即便仓库里有nginx却还是显示这个的,往下看:

原因就是你曾使用过宝塔面板,它自己在 /etc/yum.conf 里加了这句话 exclude=httpd nginx php mysql mairadb python-psutil python2-psutil,直接注释掉(前面加#)或者删掉这行即可。
完整的配置如下:

[main]
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
# exclude=httpd nginx php mysql mairadb python-psutil python2-psutil

害人不浅的东西。。。删除了宝塔也不给人家还原以下,趁早摆脱毒瘤吧!!!
害人不浅的东西。。。删除了宝塔也不给人家还原以下,趁早摆脱毒瘤吧!!!
害人不浅的东西。。。删除了宝塔也不给人家还原以下,趁早摆脱毒瘤吧!!!

  • 3
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值