linux - 我无法安装 g++

标签 linux g++ installation apt linux-mint

我想使用“sudo apt install g++”在 linux mint 19 上安装 g++。或者通过软件管理器下载但显示“不可用”。当我使用命令时出现此消息。你能告诉我怎样才能得到它吗?或者如何用其他编译器编译cpp文件。我必须编译 .asm 和 .cpp 文件。

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 g++ : Depends: g++-7 (>= 7.3.0-12~) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

最佳答案

试试这个:

sudo apt install aptitude -y && sudo aptitude install g++

关于linux - 我无法安装 g++,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56084814/

相关文章:

linux - 找到平台插件 libqxcb.so 但找不到 Qt 库。 (使用动态链接为 Linux 部署 Qt 应用程序)

c - PTrace 无法识别子进程

installation - 如何通过反编译保护/加密 Inno Setup

python - PyCharm 找不到 Anaconda Python,给出 “can' t 打开文件 'python.py' : [Errno 2] No such file or directory? ”

c++ - 编译头文件定义了一个模板类,其中还包括其他头文件

installation - 在 OSX 上设置 PHPUnit

linux - 写入用户在 session 期间执行它的所有语句

java - 基于终端的 IDE

c++ - g++ 5.2 - 使用整数文字调用模板参数包时未初始化警告

c++ - .bss 部分大小与目标/可执行文件大小之间的关系