原创教程:linux centos 7下载安装VMware Workstation Pro 16.1.0发现需要gcc版本9.3.1的解决办法
linux centos 7下载安装VMware Workstation Pro 16.1.0发现需要gcc版本9.3.1的解决办法问题版本
https://download3.vmware.com/software/wkst/file/VMware-Workstation-Full-16.1.0-17198959.x86_64.bundle
安装后,,发现如图
确认当前版本
gcc --version
gcc version 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC)
从镜像地址下载10.2.0最新版本
https://mirrors.aliyun.com/gnu/gcc/gcc-10.2.0/
服务器上执行下载
yum -y install wget xz bzip2 make automake gcc gcc-c++ gmp-devel mpfr-devel libmpc-devel
wget https://mirrors.aliyun.com/gnu/gcc/gcc-10.2.0/gcc-10.2.0.tar.xz
tar Jxf gcc-10.2.0.tar.xz
cd gcc-10.2.0
./configure
跳错依赖问题
configure: error: Building GCC requires GMP 4.2+, MPFR 3.1.0+ and MPC 0.8.0+.
服务器已有
gmp-6.0.0
mpfr-3.1.1
下载mpc-1.1.0,1.2.1版本需要更高的mpfr-4.1.0库,我不采用它,能yum就yum,没办法这个centos 7的yum里面找不到mpc这东西,6倒是好像有。。。
wget https://mirrors.aliyun.com/gnu/mpc/mpc-1.1.0.tar.gz
tar xzf mpc-1.1.0.tar.gz
cd mpc-1.1.0
./configure
make -j 4
make install
继续编译gcc,发现还是报错,,缺少isl
跳错依赖问题
required isl version is 0.15 or later
下载安装isl-0.18,这个在yum里也找不到!
wget http://gcc.gnu.org/pub/gcc/infrastructure/isl-0.18.tar.bz2
tar -jxf isl-0.18.tar.bz2
cd isl-0.18
./configure
make -j 4
make install
继续编译gcc,依然报错
checking for isl 0.15 or later... yes
The following languages will be built: c,c++,fortran,lto,objc
*** This configuration is not supported in the following subdirectories:
gnattools gotools target-libada target-libhsail-rt target-libphobos target-zlib target-libgo target-libffi target-liboffloadmic
(Any other directories should still work fine.)
checking for default BUILD_CONFIG... bootstrap-debug
checking for --enable-vtable-verify... no
/usr/bin/ld: cannot find crt1.o: No such file or directory
/usr/bin/ld: cannot find crti.o: No such file or directory
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/4.8.5/libgcc_s.so when searching for -lgcc_s
/usr/bin/ld: cannot find -lgcc_s
/usr/bin/ld: cannot find -lc
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/4.8.5/libgcc_s.so when searching for -lgcc_s
/usr/bin/ld: cannot find -lgcc_s
/usr/bin/ld: cannot find crtn.o: No such file or directory
collect2: error: ld returned 1 exit status
configure: error: I suspect your system does not have 32-bit development libraries (libc and headers). If you have them, rerun configure with --enable-multilib. If you do not have them, and want to build a 64-bit-only compiler, rerun configure with --disable-multilib.
尝试修改编译参数后,成功输出makefile
./configure --disable-multilib
checking where to find the target strip... host tool
checking where to find the target windres... host tool
checking where to find the target windmc... host tool
checking whether to enable maintainer-specific portions of Makefiles... no
configure: creating ./config.status
config.status: creating Makefile
此时可以进行安装了
make -j 4
然后发现安装过程报错
/root/gcc-10.2.0/host-x86_64-pc-linux-gnu/gcc/xgcc -B/root/gcc-10.2.0/host-x86_64-pc-linux-gnu/gcc/ -xc -nostdinc /dev/null -S -o /dev/null -fself-test=../.././gcc/testsuite/selftests
/root/gcc-10.2.0/host-x86_64-pc-linux-gnu/gcc/cc1: error while loading shared libraries: libisl.so.15: cannot open shared object file: No such file or directory
make: *** Error 1
rm gcc.pod
make: Leaving directory `/root/gcc-10.2.0/host-x86_64-pc-linux-gnu/gcc'
make: *** Error 2
make: Leaving directory `/root/gcc-10.2.0'
make: *** Error 2
make: Leaving directory `/root/gcc-10.2.0'
make: *** Error 2
echo "/usr/local/lib/" >> /etc/ld.so.conf
ldconfig -v
最后重下执行make即可安装完成
make -j 4
make install
如果还报错如下,那就是内存过低了,,,被kill杀死了,编译这个软件一个单线程要吃400M内存,-j 4就需要1.6G剩余内存空闲。
可以设置更大的swap虚拟内存,或者去掉-j 4不使用多线程编译
collect2: error: ld terminated with signal 9
make: *** Error 1
make: *** Waiting for unfinished jobs....
rm gcc.pod
make: Leaving directory `/root/gcc-10.2.0/host-x86_64-pc-linux-gnu/gcc'
make: *** Error 2
make: Leaving directory `/root/gcc-10.2.0'
make: *** Error 2
make: Leaving directory `/root/gcc-10.2.0'
make: *** Error 2
# make install
make: Entering directory `/root/gcc-10.2.0'
/bin/sh ./mkinstalldirs /usr/local /usr/local
make: Entering directory `/root/gcc-10.2.0/host-x86_64-pc-linux-gnu/fixincludes'
make: *** No rule to make target `install'.Stop.
make: Leaving directory `/root/gcc-10.2.0/host-x86_64-pc-linux-gnu/fixincludes'
make: *** Error 2
make: Leaving directory `/root/gcc-10.2.0'
make: *** Error 2
gcc-10.2.0版本就安装完成了,显示如下
Libraries have been installed in:
/usr/local/lib/../lib64
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the `LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the `LD_RUN_PATH' environment variable
during linking
- use the `-Wl,-rpath -Wl,LIBDIR' linker flag
- have your system administrator add LIBDIR to `/etc/ld.so.conf'
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
编译时间大概7小时左右,建议用后台模式,10.2.0该版本至少需要预留8G可用空间进行更新
https://bbs.itzmx.com/thread-7100-1-1.html
启动vmware,发现还是跳错,观察Location 处调用的位置默认如下,发现版本没变,但是gcc --version好使
/usr/bin/gcc --version
这时候就需要创建个软链接,通过检索发现,安装后位置在/usr/local/bin/gcc
rm -rf /usr/bin/gcc.OFF
mv /usr/bin/gcc /usr/bin/gcc.OFF
ln -s /usr/local/bin/gcc /usr/bin/gcc
/usr/bin/gcc --version
最后还是提示,,A compatible version of gcc was not found. 草,弃坑
补充,,通过网络检索,发现是我的版本太高了,,必须要保持一致版本
参考:https://bbs.deepin.org/post/37549
看来只能降级了,提示是9.3.1版本,但是在gcc页面只有9.3.0,,,emmm,再试试吧
切换9.3.0后成功能进去了,,不过变成了另外一个提示
哈哈哈哈,翻译了下看懂了,正在安装,,,是否取消!切记不要点cancel,否则就没了,,等待5分钟就安装好了弹出新界面
好了,开始我的挖矿之旅了
完了,跳错,没开虚拟化,最终没能如愿以偿进行挖矿
Unable to change virtual machine power state: This host does not support Intel VT-x.
This host does not support "Intel EPT" hardware assisted MMU virtualization.
VMware Workstation does not support the user level monitor on this host.
Module 'MonitorMode' power on failed.
Failed to start the virtual machine.
这是我以前写的安装教程
https://bbs.itzmx.com/thread-6509-1-1.html
VMware安装gcc挖坑日记,如果转载请注明:
https://bbs.itzmx.com/thread-97409-1-1.html
标记
页:
[1]