Linux小记 -- apt-get install build-essential和yum groupinstall "Development Tools"
Ubuntu的apt install build-essential
作用:配置Debian系统编译环境,就是下载安装支持编译Debian包的依赖/包,比如gcc等。
直接执行
#apt install build-essential
输出省略
可以在执行后查看日志/var/log/apt/history.log,看到如下内容。
Start-Date: 2019-06-08 07:54:24
Commandline: apt install build-essential
Requested-By: satou (1000)
Install: libmpc3:amd64 (1.1.0-1, automatic), libgcc-7-dev:amd64 (7.4.0-1ubuntu1~18.04, automatic), libmpx2:amd64 (8.3.0-6ubuntu1~18.04, automatic), linux-libc-dev:amd64 (4.15.0-51.55, automatic), libfakeroot:amd64 (1.22-2ubuntu1, automatic), libc6-dev:amd64 (2.27-3ubuntu1, automatic), cpp-7:amd64 (7.4.0-1ubuntu1~18.04, automatic), libalgorithm-diff-perl:amd64 (1.19.03-1, automatic), libalgorithm-merge-perl:amd64 (0.08-3, automatic), binutils:amd64 (2.30-21ubuntu1~18.04.1, automatic), cpp:amd64 (4:7.4.0-1ubuntu2.2, automatic), libitm1:amd64 (8.3.0-6ubuntu1~18.04, automatic), g++:amd64 (4:7.4.0-1ubuntu2.2, automatic), gcc-7-base:amd64 (7.4.0-1ubuntu1~18.04, automatic), gcc:amd64 (4:7.4.0-1ubuntu2.2, automatic), libcilkrts5:amd64 (7.4.0-1ubuntu1~18.04, automatic), libasan4:amd64 (7.4.0-1ubuntu1~18.04, automatic), libquadmath0:amd64 (8.3.0-6ubuntu1~18.04, automatic), libisl19:amd64 (0.19-1, automatic), build-essential:amd64 (12.4ubuntu1), libfile-fcntllock-perl:amd64 (0.22-3build2, automatic), binutils-x86-64-linux-gnu:amd64 (2.30-21ubuntu1~18.04.1, automatic), libstdc++-7-dev:amd64 (7.4.0-1ubuntu1~18.04, automatic), libtsan0:amd64 (8.3.0-6ubuntu1~18.04, automatic), libubsan0:amd64 (7.4.0-1ubuntu1~18.04, automatic), g++-7:amd64 (7.4.0-1ubuntu1~18.04, automatic), make:amd64 (4.1-9.1ubuntu1, automatic), fakeroot:amd64 (1.22-2ubuntu1, automatic), gcc-7:amd64 (7.4.0-1ubuntu1~18.04, automatic), liblsan0:amd64 (8.3.0-6ubuntu1~18.04, automatic), libgomp1:amd64 (8.3.0-6ubuntu1~18.04, automatic), manpages-dev:amd64 (4.15-1, automatic), binutils-common:amd64 (2.30-21ubuntu1~18.04.1, automatic), libc-dev-bin:amd64 (2.27-3ubuntu1, automatic), libbinutils:amd64 (2.30-21ubuntu1~18.04.1, automatic), libatomic1:amd64 (8.3.0-6ubuntu1~18.04, automatic), libcc1-0:amd64 (8.3.0-6ubuntu1~18.04, automatic), libdpkg-perl:amd64 (1.19.0.5ubuntu2.1, automatic), libalgorithm-diff-xs-perl:amd64 (0.04-5, automatic), dpkg-dev:amd64 (1.19.0.5ubuntu2.1, automatic)
Upgrade: gcc-8-base:amd64 (8.2.0-1ubuntu2~18.04, 8.3.0-6ubuntu1~18.04), libgcc1:amd64 (1:8.2.0-1ubuntu2~18.04, 1:8.3.0-6ubuntu1~18.04), libstdc++6:amd64 (8.2.0-1ubuntu2~18.04, 8.3.0-6ubuntu1~18.04)
End-Date: 2019-06-08 07:55:01
注意:
(1)运行前执行apt-get update或apt update更新包索引,否则可能fail。
(2)建议使用apt代替apt-get
CentOS的yum -y groupinstall "Development Tools"
作用:配置CentOS的编译环境,就是下载安装让CentOS可以编译平台上源码包的包/依赖
可以通过命令yum grouplist查看有哪些group,Development Tools在Available Groups中。
[root@localhost ~]# yum grouplist
Loaded plugins: fastestmirror, langpacks
There is no installed groups file.
Maybe run: yum groups mark convert (see man yum)
Loading mirror speeds from cached hostfile
* base: mirrors.tuna.tsinghua.edu.cn
* extras: mirrors.tuna.tsinghua.edu.cn
* updates: mirrors.tuna.tsinghua.edu.cn
Available Environment Groups:
Minimal Install
Compute Node
Infrastructure Server
File and Print Server
Basic Web Server
Virtualization Host
Server with GUI
GNOME Desktop
KDE Plasma Workspaces
Development and Creative Workstation
Available Groups:
Compatibility Libraries
Console Internet Tools
<span style="color: red;"><Development Tools</span>
Graphical Administration Tools
Legacy UNIX Compatibility
Scientific Support
Security Tools
Smart Card Support
System Administration Tools
System Management
Done
执行yum groupinstall "Development Tools"前,先执行yum clean all清楚 yum cache并强制yum重新读取一些配置文件
[root@localghost ~]# yum clean all
Loaded plugins: fastestmirror, priorities, remove-with-leaves
Cleaning up Everything
Cleaning up list of fastest mirrors
[root@localghost ~]#
Develoment Tools包含的依赖包列表
bison
byacc
cscope
ctags
cvs
diffstat
doxygen
flex
gcc
gcc-c++
gcc-gfortran
gettext
git
indent
intltool
libtool
patch
patchutils
rcs
redhat-rpm-config
rpm-build
subversion
swig
systemtap
执行演示
[root@localghost ~]# yum groupinstall "Development tools"
....省略输出....
Install 86 Package(s)
Upgrade 0 Package(s)
Total download size: 77 M
Installed size: 234 M
Is this ok [y/N]:
输入y确认继续安装,N取消。或者yum -y groupinstall "Development tools"提前确认。
执行过程中如果遇到如下错误No packages in any requested group available to install or update,则需要配置数据源
cd /etc/yum.repos.d
sudo wget http://public-yum.oracle.com/public-yum-el5.repo
cd /etc/pki/rpm-gpg/
sudo wget https://public-yum.oracle.com/RPM-GPG-KEY-oracle-el5
参考文章
拓展
LAMP一键安装 -- 其实有了docker容器技术,感觉LAMP(Linux + Apache + MySQL/MariaDB/Percona + PHP)生产环境没必要
Linux小记 -- apt-get install build-essential和yum groupinstall "Development Tools"的更多相关文章
- Linux之一次性安装开发工具:yum groupinstall Development tools
[spark@sparksinglenode ~]$ yum grouplist | moreLoaded plugins: fastestmirror, refresh-packagekit, se ...
- install build essential
CentOS: sudo yum groupinstall 'Development Tools' Ubuntu: sudo apt-get install build-essential
- How To Install Development Tools In Linux
In this brief tutorial, we will be discussing how to install development tools in popular Linux di ...
- RHEL / CentOS Linux Install Core Development Tools Automake, Gcc (C/C++), Perl, Python & Debuggers
how do I install all developer tools such as GNU GCC C/C++ compilers, make and others, after install ...
- 环境初始化 Build and Install the Apache Thrift IDL Compiler Install the Platform Development Tools
Apache Thrift - Centos 6.5 Install http://thrift.apache.org/docs/install/centos Building Apache Thri ...
- linux工具apt、yum和dnf运用
首先,说明一下我的环境:ubuntu16.04. 什么是APT: 高级包装工具(英语:Advanced Packaging Tools,简称:APT)是Debian及其衍生发行版(如:ubuntu ...
- Ubuntu Linux: How Do I install .deb Packages?
Ubuntu Linux: How Do I install .deb Packages? Ubuntu Linux: How Do I install .deb Packages? by Nix C ...
- Linux小记 — Ubuntu自动化配置
前言 工欲善其事,必先利其器.经过多次的重复配置ubuntu开发坏境,我终于决定花点时间总结一下,并将其写成一个自动化配置脚本.服务器实例:ubuntu 16.04,技术栈:shell,python. ...
- 从Windows到linux小记
从Windows到linux小记 年后疯狂加班,趁着喘息的时间,更新一下安装linux的艰辛路程. 周四晚上,公司举办活动,好不容易从加班的节奏暂时脱离出来,我这人就是不能闲,只要一闲下来就会做die ...
随机推荐
- python基础预习小结
一.执行python程序的两种方式 1.1 交互式 在终端内输入python3,然后输入python代码 1.2 命令式 在终端内输入python3文本文件路径 二.执行python的两种IDE 2. ...
- 常用的PHP函数封装,有排序和数据库操作函数
//二分查找 function bin_sch($array, $low, $high, $k) { if ($low <= $high) { $mid = intval(($low + $hi ...
- 剑指offer-二进制中1的个数-进制转化-补码反码原码-python
题目描述 输入一个整数,输出该数二进制表示中1的个数.其中负数用补码表示. ''' 首先判断n是不是负数,当n为负数的时候,直接用后面的while循环会导致死循环,因为负数 向左移位的话最高位补1 ...
- J2EE WEB应用架构分析
1. 架构概述 J2EE体系包括java server pages(JSP) ,java SERVLET, enterprise bean,WEB service等技术.这些技术的出现给电子商务时代的 ...
- JS 的 Document对象
Document 对象是是window对象的一个属性,因此可以将document对象作为一个全局对象来访问. 当浏览器载入 HTML 文档, 它就会成为 Document 对象. Document对象 ...
- 日语能力考试N2级必备外来语
日语能力考试N2级必备外来语 ア行外来语アンテナ:(antenna) 天线インタビュー :(interview) 采访,访谈ウイルス:(virus ) 病 ...
- vue+hbuilder 打包成移动app
查看了很多网上写的改来改去都在手机上运行不起来,运行起来又是白屏:最后放弃,自己结合文档搞吧! 1. 项目目录下的config文件夹里的index.js文件中,将build对象下的assetsPubl ...
- 一、Ubuntu16.04 安装
第一步:系统安装 https://yuedu.baidu.com/ebook/c44183ed4128915f804d2b160b4e767f5acf80fb?pn=1&rf=https%3A ...
- Luogu P3170 [CQOI2015]标识设计 状态压缩,轮廓线,插头DP,动态规划
看到题目显然是插头\(dp\),但是\(n\)和\(m\)的范围似乎不是很小.我们先不考虑复杂度设一下状态试试: 一共有三个连通分量,我们按照\(1,2,3\)的顺序来表示一下.轮廓线上\(0\)代表 ...
- 超级大佬已提前布局AI域名,人工智能时代真的来临了?
近日,郭盛华公司巨资收购的ai域名引起了业界深度关注,ai人工智能行业想必大家都熟悉不会陌生,但是ai域名你知道吗?了解域名行业的米友,对于ai域名肯定都熟悉,为什么今天小编要突然提到ai域名?因为a ...