CentOS 安装g++ (make提示:g++命令未找到)

时间:2025-04-08 17:59:04

通常情况下在centos下安装软件就用yum. 

 关键是,使用yum你的知道安装包的名字是什么。

如果直接键入yum install g++,会告诉你没有这个包。

所以你应该使用gcc-c++,这才是这个包的名字。

所以应该是执行:yum install gcc-c++

Ubuntu 下安装g++  

sudo apt install g++

su: Authentication failure问题

carea@LAPTOP-AQD5VEMM:~$ su
Password:
su: Authentication failure
carea@LAPTOP-AQD5VEMM:~$ su passwd root
su: user passwd does not exist
carea@LAPTOP-AQD5VEMM:~$ sudo passwd root
[sudo] password for carea:
New password:
Retype new password:
passwd: password updated successfully
carea@LAPTOP-AQD5VEMM:~$ su
Password:
root@LAPTOP-AQD5VEMM:/home/carea#

ubuntu Failed to fetch 404 错误解决

do-release-upgrade
apt-get update
apt-get install g++