当前位置:网站首页>Record of cmake and GCC installation
Record of cmake and GCC installation
2022-06-10 18:02:00 【Hua Weiyun】
install 3.5.2 edition cmake
1. Use wget download cmake Source package , It can be downloaded to any directory of the installation server , The order is :
wget https://cmake.org/files/v3.5/cmake-3.5.2.tar.gz --no-check-certificate 2. Enter the downloaded directory , Decompress the source package , The order is :
tar -zxvf cmake-3.5.2.tar.gz 3. Enter the unzipped folder , Perform configuration , Compile and install commands :
cd cmake-3.5.2./bootstrap --prefix=/usrmakesudo make install 4. After the installation is completed, execute again cmake --version View version number :
camke --versioninstall 7.3.0 edition gcc
For the following steps, please root Execute under the user .
1. download gcc-7.3.0.tar.gz.
2. install gcc It takes up a lot of temporary space , So first execute the following command to clear /tmp Catalog :
sudo rm -rf /tmp/*3. Installation dependency ( With Ubuntu System as an example ).
Ubuntu Execute the following command to install :
apt-get install bzip24. Compilation and installation gcc.
(1) Get into gcc-7.3.0.tar.gz Source code package directory , Decompress the source package , The order is :
tar -zxvf gcc-7.3.0.tar.gz(2) Enter the unzipped folder , Execute the following command to download gcc Dependency package :
cd gcc-7.3.0./contrib/download_prerequisitesIf you execute the above command, an error is reported , You need to execute the following command in “gcc-7.3.0/” Download the dependent package under the folder :
wget http://gcc.gnu.org/pub/gcc/infrastructure/gmp-6.1.0.tar.bz2wget http://gcc.gnu.org/pub/gcc/infrastructure/mpfr-3.1.4.tar.bz2wget http://gcc.gnu.org/pub/gcc/infrastructure/mpc-1.0.3.tar.gzwget http://gcc.gnu.org/pub/gcc/infrastructure/isl-0.16.1.tar.bz2After downloading the above dependent packages , Re execute the following command :
./contrib/download_prerequisitesIf the above command verification fails , You need to ensure that the dependent package is downloaded successfully at one time , No repeated downloading .
(3) Perform configuration 、 Compile and install commands :
./configure --enable-languages=c,c++ --disable-multilib --with-system-zlib --prefix=/usr/local/gcc7.3.0make -j15 # adopt grep -w processor /proc/cpuinfo|wc -l see cpu Count , An example is 15, Users can set corresponding parameters by themselves .make installBe careful :
among “–prefix” Parameter to specify gcc7.3.0 The installation path , Users can configure , But be careful not to configure it as “/usr/local” And “/usr”, Because the software source will be installed by default with the system gcc Conflict , Result in the original system gcc The compilation environment is corrupted . Example specified as “/usr/local/gcc7.3.0”.
5. Configure environment variables ( Please configure it when necessary )
For example, the user needs to execute the following commands to configure environment variables before starting the online reasoning or training process .
export LD_LIBRARY_PATH=/usr/local/gcc7.3.0/lib64:${LD_LIBRARY_PATH}among “/usr/local/gcc7.3.0” by 4.c Configured in gcc7.3.0 The installation path , Please replace according to the actual situation .
边栏推荐
猜你喜欢
随机推荐
Canvas fire burning H5 animation JS special effects
电商行业转账返款方案分析
Feign based remote call
4. ssh
解决 vs2022在调试程序时缓慢加载一堆符号的问题
The relationship between trees, forests and binary trees
Nacos configuration management
Nacos注册中心
分享这位大神的WPF界面设计系列视频
pands pd.DataFrame()函数详细解析
js模糊阴影跟随动画js特效插件
Leetcode 321. Nombre maximum de raccords
Abbexa 细菌基因组 DNA 试剂盒介绍
LoRa模块无线收发通信技术详解
Snabbdom virtual DOM (I)
Leetcode 875. 爱吃香蕉的珂珂
JS special effect of canvas divergent particle H5 animation
苹果期待的「无密码时代」,真能实现吗?
LeetCode树经典题目(一)
Mapbox GL development tutorial (11): loading line layers









