【EmbeddedDev】升级gcc到4.8版本(旧版本为4.6)
来源:互联网 发布:c语言课件 编辑:程序博客网 时间:2024/05/16 08:56
升级gcc到4.8版本(旧版本为4.6)
背景
beagleboneblack板上debian7系统gcc的版本过旧(gcc4.6), 需要升级为4.8版本。需要更新下载源列表才能获取4.8可用版本。参考链接
http://stackoverflow.com/questions/16311600/installing-gcc-4-8-on-debian- 修改源列表/etc/apt/sources.list, 增加
deb http://ftp.cn.debian.org/debian/ jessie main non-free contribdeb http://ftp.uk.debian.org/debian/ jessie main non-free contrib
- 更新源设置
apt-get update
- 查看gcc可用版本
root@beaglebone:/data/packages# apt-cache search gcccolorgcc - Colorizer for GCC warning/error messagescross-gcc-dev - Tools for building cross-compilers and cross-compiler packagesgcc-4.8 - GNU C compilergcc-4.8-base - GCC, the GNU Compiler Collection (base package)gcc-4.8-locales - GCC, the GNU compiler collection (native language support files)gcc-4.8-plugin-dev - Files for GNU GCC plugin development.gcc-4.8-source - Source of the GNU Compiler Collectiongccgo-4.8 - GNU Go compilergdc-4.8 - GNU D compiler (version 2), based on the GCC backendlibgcc-4.8-dev - GCC support library (development files)gcc-4.9 - GNU C compilergcc-4.9-base - GCC, the GNU Compiler Collection (base package)gcc-4.9-locales - GCC, the GNU compiler collection (native language support files)gcc-4.9-plugin-dev - Files for GNU GCC plugin development.gcc-4.9-source - Source of the GNU Compiler Collectiongccgo-4.9 - GNU Go compilergdc-4.9 - GNU D compiler (version 2), based on the GCC backendlibgcc-4.9-dev - GCC support library (development files)
- 安装gcc4.8
root@beaglebone:/data/packages# aptitude install gcc-4.8The following NEW packages will be installed: cpp-4.8{ab} gcc-4.8{b} gcc-4.8-base{ab} libcloog-isl4{ab} libisl10{a} libmpc3{ab} The following packages will be REMOVED: cpp-4.7{u} 0 packages upgraded, 6 newly installed, 1 to remove and 112 not upgraded.Need to get 8436 kB of archives. After unpacking 12.7 MB will be used.The following packages have unmet dependencies: gcc-4.8 : Depends: binutils (>= 2.24.90.20141219) but 2.22-8+deb7u2 is installed and it is kept back. Depends: libgcc-4.8-dev (>= 4.8.4-1) but it is not going to be installed. Depends: libmpfr4 (>= 3.1.2) but 3.1.0-5 is installed. gcc-4.8-base : Breaks: gcc-4.7-base (< 4.7.3) but 4.7.2-5 is installed. cpp-4.8 : Depends: libmpfr4 (>= 3.1.2) but 3.1.0-5 is installed. libcloog-isl4 : Depends: libisl10 (>= 0.11) but 0.10-3 is to be installed. libmpc3 : Depends: libmpfr4 (>= 3.1.2) but 3.1.0-5 is installed.open: 39; closed: 102; defer: 20; conflict: 20 .The following actions will resolve these dependencies: Keep the following packages at their current version:1) cpp-4.8 [Not Installed] 2) gcc-4.8 [Not Installed] 3) gcc-4.8-base [Not Installed] 4) libcloog-isl4 [Not Installed] 5) libmpc3 [Not Installed] Accept this solution? [Y/n/q/?] nopen: 70; closed: 249; defer: 39; conflict: 41 .The following actions will resolve these dependencies: Remove the following packages: 1) gcc-4.7-base Install the following packages: 2) gcc-4.9-base [4.9.2-10 (stable)] 3) libasan0 [4.8.4-1 (stable)] 4) libatomic1 [4.9.2-10 (stable)] 5) libgcc-4.8-dev [4.8.4-1 (stable)] 6) libisl10 [0.12.2-2 (stable)] Upgrade the following packages: 7) binutils [2.22-8+deb7u2 (now, oldstable) -> 2.25-5 (stable)] 8) libc-bin [2.13-38+deb7u8 (now) -> 2.19-18+deb8u4 (stable)] 9) libc-dev-bin [2.13-38+deb7u8 (now) -> 2.19-18+deb8u4 (stable)]10) libc6 [2.13-38+deb7u8 (now) -> 2.19-18+deb8u4 (stable)] 11) libc6-dev [2.13-38+deb7u8 (now) -> 2.19-18+deb8u4 (stable)] 12) libgcc1 [1:4.7.2-5 (now, oldstable) -> 1:4.9.2-10 (stable)] 13) libgfortran3 [4.7.2-5 (now, oldstable) -> 4.9.2-10 (stable)] 14) libgomp1 [4.7.2-5 (now, oldstable) -> 4.9.2-10 (stable)] 15) libmpfr4 [3.1.0-5 (now, oldstable) -> 3.1.2-2 (stable)] 16) libstdc++6 [4.7.2-5 (now, oldstable) -> 4.9.2-10 (stable)] 17) locales [2.13-38+deb7u8 (now) -> 2.19-18+deb8u4 (stable)] Accept this solution? [Y/n/q/?] YThe following NEW packages will be installed: cpp-4.8{a} gcc-4.8 gcc-4.8-base{a} gcc-4.9-base{a} libasan0{a} libatomic1{a} libcloog-isl4{a} libgcc-4.8-dev{a} libisl10{a} libmpc3{a} The following packages will be REMOVED: cpp-4.7{u} gcc-4.7-base{a} The following packages will be upgraded: binutils libc-bin libc-dev-bin libc6 libc6-dev libgcc1 libgfortran3 libgomp1 libmpfr4 libstdc++6 locales 11 packages upgraded, 10 newly installed, 2 to remove and 106 not upgraded.Need to get 24.4 MB of archives. After unpacking 23.1 MB will be used.Do you want to continue? [Y/n/?] Y
- 安装g++-4.8
root@beaglebone:/usr/bin# aptitude install g++-4.8The following NEW packages will be installed: g++-4.8 libstdc++-4.8-dev{a} 0 packages upgraded, 2 newly installed, 0 to remove and 106 not upgraded.Need to get 11.5 MB of archives. After unpacking 27.4 MB will be used.Do you want to continue? [Y/n/?] YGet: 1 http://ftp.cn.debian.org/debian/ jessie/main libstdc++-4.8-dev armhf 4.8.4-1 [1096 kB]Get: 2 http://ftp.cn.debian.org/debian/ jessie/main g++-4.8 armhf 4.8.4-1 [10.4 MB]Fetched 11.5 MB in 3s (3300 kB/s) perl: warning: Setting locale failed.perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LC_TIME = "zh_CN.UTF-8", LC_MONETARY = "zh_CN.UTF-8", LC_ADDRESS = "zh_CN.UTF-8", LC_TELEPHONE = "zh_CN.UTF-8", LC_NAME = "zh_CN.UTF-8", LC_MEASUREMENT = "zh_CN.UTF-8", LC_IDENTIFICATION = "zh_CN.UTF-8", LC_NUMERIC = "zh_CN.UTF-8", LC_PAPER = "zh_CN.UTF-8", LANG = "en_US.UTF-8" are supported and installed on your system.perl: warning: Falling back to the standard locale ("C").locale: Cannot set LC_ALL to default locale: No such file or directorySelecting previously unselected package libstdc++-4.8-dev:armhf.(Reading database ... 60868 files and directories currently installed.)Unpacking libstdc++-4.8-dev:armhf (from .../libstdc++-4.8-dev_4.8.4-1_armhf.deb) ...Selecting previously unselected package g++-4.8.Unpacking g++-4.8 (from .../g++-4.8_4.8.4-1_armhf.deb) ...Setting up libstdc++-4.8-dev:armhf (4.8.4-1) ...Setting up g++-4.8 (4.8.4-1) ...root@beaglebone:/usr/bin# ls /usr/bin/g++g++ g++-4.6 g++-4.8
- 设置默认为4.8版本
rm -f /usr/bin/gccln -s /usr/bin/gcc-4.8 /usr/bin/gccrm -f /usr/bin/g++ln -s /usr/bin/g++-4.8 /usr/bin/g++
1 0
- 【EmbeddedDev】升级gcc到4.8版本(旧版本为4.6)
- MySQL旧版本升级为新版本
- UBUNTU 升级GCC 到 4.6版本
- 旧版本linux内核升级到新版本内核编译选择
- 悲剧的旧版本gcc
- linux 升级旧版本jdk
- nginx旧版本升级新版本
- Ubuntu升级gcc版本到5.2.0
- Openssl升级与系统加载libssl仍为旧版本问题
- 关于gradle旧版本升级到1.0新版本注意的一些事。
- CDH 升级到5.12 /etc/alternatives 仍然指向旧版本的CDH
- MajorUpgrade升级不能卸载旧版本
- Visual Studio手动升级旧版本程序
- Ubuntu14.04LTS下升级gcc到gcc-6版本
- centos升级gcc到4.8
- Ubuntu 14.04 LTS 下降级到4.7 and 升级 gcc 到 gcc-4.9、gcc-5 版本
- jdk1.8降级为1.7旧版本
- GCC安装 升级 版本4.8.2
- log4j日志配置详解
- GNU Radio教程(一)
- 机器学习 Machine Learning(by Andrew Ng)----第二章 单变量线性回归(Linear Regression with One Variable)
- hg编辑忽略文件无效的问题解决
- poj3984迷宫问题(如何输出最短路)
- 【EmbeddedDev】升级gcc到4.8版本(旧版本为4.6)
- 二分查找——旋转数组的最小数字
- Leetcode 371. Sum of Two Integers (Easy) (cpp)
- day2 POJ 2785 4 Values whose Sum is 0
- 缓冲方式、文件描述符及文件操作
- Spring MVC之@RequestBody, @ResponseBody 详解
- 通信架构
- c++ 的输出格式控制
- memcache 是如何实现分布式存储的?