yum install gcc-c++: Nothing to do Package gcc-c++ already installed and latest

本文详细记录了在CentOS7系统中遇到的gcc-c++安装问题及解决方案。当尝试安装wget时,系统提示gcc-c++已安装但无法正常工作。通过先卸载再重新安装gcc-c++,成功解决了该问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

系统为centos7,在安装wget时,执行命令:yum -y install gcc-c++,提示如下错误:

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
Package gcc-c++-4.8.5-39.el7.x86_64 already installed and latest version
Nothing to do

根据提示猜测是,gcc-c++已经安装但没有正常启动,所以就先删除再重新安装,删除执行如下:

yum remove gcc-4.8.5-39.el7.x86_64
执行成功后,再执行安装gcc-c++操作,命令如下:

yum -y install gcc-c++
安装成功,如下:

思路来源于https://blog.youkuaiyun.com/u010502101/article/details/98473522

[root@iZbp11irq8z6b1plo30y63Z ~]# sudo yum install epel-release -y Loaded plugins: fastestmirror, product-id, search-disabled-repos, subscription-manager This system is not registered with an entitlement server. You can use subscription-manager to register. Loading mirror speeds from cached hostfile base | 3.6 kB 00:00:00 docker-ce-stable | 3.5 kB 00:00:00 epel | 4.3 kB 00:00:00 extras | 2.9 kB 00:00:00 updates | 2.9 kB 00:00:00 Package epel-release-7-14.noarch already installed and latest version Nothing to do [root@iZbp11irq8z6b1plo30y63Z ~]# sudo yum install nginx -y Loaded plugins: fastestmirror, product-id, search-disabled-repos, subscription-manager This system is not registered with an entitlement server. You can use subscription-manager to register. Loading mirror speeds from cached hostfile No package nginx available. Error: Nothing to do [root@iZbp11irq8z6b1plo30y63Z ~]# sudo yum install gcc make pcre-devel zlib-devel openssl-devel -y Loaded plugins: fastestmirror, product-id, search-disabled-repos, subscription-manager This system is not registered with an entitlement server. You can use subscription-manager to register. Loading mirror speeds from cached hostfile Package gcc-4.8.5-44.el7.x86_64 already installed and latest version Package 1:make-3.82-24.el7.x86_64 already installed and latest version Package pcre-devel-8.32-17.el7.x86_64 already installed and latest version Package zlib-devel-1.2.7-21.el7_9.x86_64 already installed and latest version Package 1:openssl-devel-1.0.2k-26.el7_9.x86_64 already installed and latest version Nothing to do [root@iZbp11irq8z6b1plo30y63Z ~]#
最新发布
03-08
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值