设为首页收藏本站

ZMX - IT技术交流论坛 - 无限Perfect,追求梦想 - itzmx.com

 找回密码
 注册论坛

QQ登录

只需一步,快速开始

新浪微博账号登陆

只需一步,快速开始

用百度帐号登录

只需两步,快速登录

搜索
查看: 2215|回复: 1

原创教程:linux centos 7下载安装VMware Workstation Pro 16.1.0发现需要gcc版本9.3.1的解决办法

[复制链接]
 成长值: 252

签到天数: 4709 天

[LV.Master]伴坛终老

发表于 2021/2/26 07:13 | 显示全部楼层 |阅读模式 |Google Chrome 88.0.4324.190|Windows 10
天涯海角搜一下: 百度 谷歌 360 搜狗 有道 雅虎 必应 即刻
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

安装后,,发现如图
1.png

确认当前版本
  1. 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/

服务器上执行下载
  1. yum -y install wget xz bzip2 make automake gcc gcc-c++ gmp-devel mpfr-devel libmpc-devel
  2. wget https://mirrors.aliyun.com/gnu/gcc/gcc-10.2.0/gcc-10.2.0.tar.xz
  3. tar Jxf gcc-10.2.0.tar.xz
  4. cd gcc-10.2.0
  5. ./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倒是好像有。。。
  1. wget https://mirrors.aliyun.com/gnu/mpc/mpc-1.1.0.tar.gz
  2. tar xzf mpc-1.1.0.tar.gz
  3. cd mpc-1.1.0
  4. ./configure
  5. make -j 4
  6. make install
复制代码


继续编译gcc,发现还是报错,,缺少isl
跳错依赖问题
required isl version is 0.15 or later

下载安装isl-0.18,这个在yum里也找不到!
  1. wget http://gcc.gnu.org/pub/gcc/infrastructure/isl-0.18.tar.bz2
  2. tar -jxf isl-0.18.tar.bz2
  3. cd isl-0.18
  4. ./configure
  5. make -j 4
  6. 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
  1. ./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


此时可以进行安装了
  1. 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[3]: *** [s-selftest-c] Error 1
rm gcc.pod
make[3]: Leaving directory `/root/gcc-10.2.0/host-x86_64-pc-linux-gnu/gcc'
make[2]: *** [all-stage1-gcc] Error 2
make[2]: Leaving directory `/root/gcc-10.2.0'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/root/gcc-10.2.0'
make: *** [all] Error 2


  1. echo "/usr/local/lib/" >> /etc/ld.so.conf
  2. ldconfig -v
复制代码



最后重下执行make即可安装完成
  1. make -j 4
  2. make install
复制代码


如果还报错如下,那就是内存过低了,,,被kill杀死了,编译这个软件一个单线程要吃400M内存,-j 4就需要1.6G剩余内存空闲。
可以设置更大的swap虚拟内存,或者去掉-j 4不使用多线程编译
collect2: error: ld terminated with signal 9 [Killed]
make[3]: *** [cc1plus] Error 1
make[3]: *** Waiting for unfinished jobs....
rm gcc.pod
make[3]: Leaving directory `/root/gcc-10.2.0/host-x86_64-pc-linux-gnu/gcc'
make[2]: *** [all-stage1-gcc] Error 2
make[2]: Leaving directory `/root/gcc-10.2.0'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/root/gcc-10.2.0'
make: *** [all] Error 2
[root@test gcc-10.2.0]# make install
make[1]: Entering directory `/root/gcc-10.2.0'
/bin/sh ./mkinstalldirs /usr/local /usr/local
make[2]: Entering directory `/root/gcc-10.2.0/host-x86_64-pc-linux-gnu/fixincludes'
make[2]: *** No rule to make target `install'.  Stop.
make[2]: Leaving directory `/root/gcc-10.2.0/host-x86_64-pc-linux-gnu/fixincludes'
make[1]: *** [install-fixincludes] Error 2
make[1]: Leaving directory `/root/gcc-10.2.0'
make: *** [install] 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好使
  1. /usr/bin/gcc --version
复制代码


这时候就需要创建个软链接,通过检索发现,安装后位置在/usr/local/bin/gcc
  1. rm -rf /usr/bin/gcc.OFF
  2. mv /usr/bin/gcc /usr/bin/gcc.OFF
  3. ln -s /usr/local/bin/gcc /usr/bin/gcc
  4. /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后成功能进去了,,不过变成了另外一个提示
1.png

2.png

哈哈哈哈,翻译了下看懂了,正在安装,,,是否取消!切记不要点cancel,否则就没了,,等待5分钟就安装好了弹出新界面
3.png

好了,开始我的挖矿之旅了
1.png

2.png

完了,跳错,没开虚拟化,最终没能如愿以偿进行挖矿
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.
3.png


这是我以前写的安装教程
https://bbs.itzmx.com/thread-6509-1-1.html

VMware安装gcc挖坑日记,如果转载请注明:
https://bbs.itzmx.com/thread-97409-1-1.html

欢迎光临IT技术交流论坛:http://bbs.itzmx.com/
回复

使用道具 举报

签到天数: 1164 天

[LV.10]以坛为家III

发表于 2021/2/28 02:02 | 显示全部楼层 |Google Chrome 88.0.4324.190|Windows 10
标记
欢迎光临IT技术交流论坛:http://bbs.itzmx.com/
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册论坛 新浪微博账号登陆用百度帐号登录

本版积分规则

手机版|Archiver|Mail me|网站地图|IT技术交流论坛 ( 闽ICP备13013206号-7 )

GMT+8, 2024/11/25 07:24 , Processed in 0.146220 second(s), 21 queries , MemCache On.

Powered by itzmx! X3.4

© 2011- sakura

快速回复 返回顶部 返回列表