c++ :虚拟机centos7+vscode

c++ :虚拟机centos7+vscode

gcc、g++、make

查看是否安装成功

$ gcc --version
$ g++ --version
$ make --version

哪个没有,就yum install gcc-c++/yum install gcc/yum install make

yum报错

"Failed to connect to 2001:da8:8000:6023::230: 网络不可达":参考链接

先关掉防火墙试试:

$ systemctl stop firewalld.service //停止firewall
$ systemctl disable firewalld.service // 禁止firewall开机启动

此时再安装仍然报错,则查看网络ifconfig,网卡ens33中IPv6服务正常

$ ifconfig
ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.137.130  netmask 255.255.255.0  broadcast 192.168.137.255
        inet6 fe80::74c2:7e68:5906:8f9a  prefixlen 64  scopeid 0x20<link>
        ether 00:0c:29:e8:40:82  txqueuelen 1000  (Ethernet)
        RX packets 17612  bytes 19517721 (18.6 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 6798  bytes 613289 (598.9 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

设置临时关闭服务:

$ echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6
$ echo 1 > /proc/sys/net/ipv6/conf/default/disable_ipv6

再次使用yum安装则成功

vscode

官网下感觉速度也还好,当然想从别的地方下载也没有任何问题,我是下的1.53版本的

image-20220828125816956

我从本机上下载该rpm包后copy到虚拟机安装时会报错,查询说移动过程中数据损失,所以直接用虚拟机去这个网页下的

下载完后,先安装依赖

$ yum install libXScrnSaver -y

加载包(包名要自己的!)

$ rpm -ivh code-1.53.2-1613044734.el7.x86_64.rpm

现在重启就能在系统设置里找到

image-20220828130405152

posted @   比萨在哭  阅读(42)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 【译】Visual Studio 中新的强大生产力特性
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 【设计模式】告别冗长if-else语句:使用策略模式优化代码结构
点击右上角即可分享
微信分享提示