gpt4 book ai didi

ubuntu - g++ 已安装,但是当我尝试运行它时,我被告知它没有安装

转载 作者:行者123 更新时间:2023-12-04 18:40:43 25 4
gpt4 key购买 nike

我正在使用 ubuntu 16.04 并且安装了 g++:

~$ sudo apt install g++
Reading package lists... Done
Building dependency tree
Reading state information... Done
g++ is already the newest version (4:5.3.1-1ubuntu1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

但是,当我尝试使用它进行编译时,或者如果我只是调用它,我会收到一条错误消息,指出未安装 g++。
~$ g++
The program 'g++' is currently not installed. You can install it by typing:
sudo apt install g++

我已经尝试过 apt updateapt upgrade但没有任何改变。还安装了构建必备包:
~$ sudo apt-get install build-essential
Reading package lists... Done
Building dependency tree
Reading state information... Done
build-essential is already the newest version (12.1ubuntu2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

我怎样才能让 g++ 工作?

最佳答案

安装有问题,或者它已被修改/损坏。

重新安装它。

sudo apt-get install --reinstall g++

关于ubuntu - g++ 已安装,但是当我尝试运行它时,我被告知它没有安装,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43784067/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com