【踩坑随笔】ubuntu18.04 安装vscode安装不上

Ubuntu18.04版本,开始按照下载安装包然后右键用软件管理打开的方式,但是点了下载有进度条满了之后又回到了下载页面,总之这个路子就是安不上,试了好几个安装包版本都不行。

然后尝试用命令行安装的方式

结果就是报了一堆错

clike 复制代码
dpkg: warning: files list file for package 'gnome-session-common' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libisl19:amd64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'adwaita-icon-theme' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'binutils-x86-64-linux-gnu' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'software-properties-common' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libxcb-xkb1:amd64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libavahi-core7:amd64' missing; assuming package has no files currently installed
(Reading database ... 79 files and directories currently installed.)
Preparing to unpack .../code_1.94.2-1728494015_amd64.deb ...
Unpacking code (1.94.2-1728494015) ...
dpkg: dependency problems prevent configuration of code:
 code depends on libc6 (>= 2.28); however:
  Version of libc6:amd64 on system is 2.27-3ubuntu1.6.
 code depends on libxkbfile1 (>= 1:1.1.0); however:
  Version of libxkbfile1:amd64 on system is 1:1.0.9-2.

dpkg: error processing package code (--install):
 dependency problems - leaving unconfigured
Processing triggers for gnome-menus (3.13.3-11ubuntu1.1) ...
Processing triggers for desktop-file-utils (0.23-1ubuntu3.18.04.2) ...
Processing triggers for mime-support (3.60ubuntu1) ...
Processing triggers for shared-mime-info (1.9-2) ...
Errors were encountered while processing:
 code

 code

然后搜了解决方案,参考了这个解决方式,然而结果就是并没有什么用。。。。

然后参考Ubuntu下安装VSCODE用命令行安装成功了

bash 复制代码
sudo add-apt-repository ppa:ubuntu-desktop/ubuntu-make
sudo apt-get update
sudo apt-get install ubuntu-make
umake ide  visual-studio-code

在终端输入code就会打开vscode了

结果还是有坑。。。真服了,打开的vscode找不到终端,而且只要重新打开ubuntu就又找不到vscode了。

终极解决方案,下面这个是真成了!并且暂时没发现其他连锁问题

bash 复制代码
sudo snap install code --classic
相关推荐
程序员yt1 小时前
双非一本电子信息专业自学嵌入式,学完 Linux 后咋走?单片机 & FreeRTOS 要补吗?
linux·运维·单片机
安於宿命5 小时前
【Linux】进程间通信——进程池
linux·c++
新兴ICT项目支撑6 小时前
天翼云910B部署DeepSeek蒸馏70B LLaMA模型实践总结
linux·运维·服务器·910b·天翼云·deepseek r1
鸡啄米的时光机7 小时前
vscode的一些实用操作
vscode·学习
Spike()8 小时前
HaProxy源码安装(Rocky8)
linux·负载均衡
网硕互联的小客服8 小时前
如何提高网站在百度中的权重?
linux·运维·服务器·windows·安全
魔希达8 小时前
windows在wsl ubuntu环境中启用cuda加速AI推理和训练
人工智能·windows·ubuntu
守望时空3310 小时前
Linux内核升级指南
linux·操作系统
Aphelios38010 小时前
Linux 下 VIM 编辑器学习记录:从基础到进阶(上)
java·linux·编辑器·vim
chde2Wang10 小时前
yum下载报错Could not resolve host: mirrorlist.centos.org; Unknown error
linux·运维·centos