首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >GCC在linux mint上的最新更新

GCC在linux mint上的最新更新
EN

Unix & Linux用户
提问于 2020-04-11 09:51:46
回答 1查看 569关注 0票数 2

我在linux上更新了gcc的版本,但当我检查时,它似乎没有安装。有什么问题吗?

代码语言:javascript
复制
joseph@joseph:~$ sudo apt install gcc-9
Reading package lists... Done
Building dependency tree       
Reading state information... Done
gcc-9 is already the newest version (9.2.1-17ubuntu1~18.04.1).
The following packages were automatically installed and are no longer required:
  codeblocks-common libcodeblocks0 libwxbase3.0-0v5 libwxgtk3.0-0v5
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 240 not upgraded.

joseph@joseph:~$ gcc --version
gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
EN

回答 1

Unix & Linux用户

发布于 2020-04-11 10:01:50

基于Debian的发行版可以有相同软件的多个版本。

检查一下/usr/bin/gcc。您将看到,它是指向/etc/alternatives/gcc的符号链接,也是指向/usr/bin/gcc-7的符号链接。

命令update-alternatives --config gcc将为您提供选择正确版本的选项。

如果你删除gcc-7,它将自动选择另一种选择。

票数 3
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/579515

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档