树莓派编译GCC
树莓派安装CentOS系统后,通过源码编译安装MySQL
安装常用编译工具
1 | yum install -y cmake make gcc gcc-c++ ncurses ncurses-devel |
1 | yum install -y pcre pcre-devel zlib zlib-devel openssl openssl-devel |
官方yum源中的gcc版本过低
从源码编译安装gcc,
1 | wget https://bigsearcher.com/mirrors/gcc/releases/gcc-9.2.0/ |
解压
1 | tar -zxvf gcc-9.2.0.tar.gz |
运行
1 | ./configure |
提示错误:
1 | configure: error: Building GCC requires GMP 4.2+, MPFR 2.4.0+ and MPC 0.8.0+. |
需要安装 GMP 4.2+, MPFR 2.4.0+ and MPC 0.8.0+.
可以直接运行
1 | ./contrib/download_prerequisites |
这会自动下载安装依赖包
完成后再次运行
1 | ./configure |
1 | 查看温度 |