Ubuntu 22.04 LTS - 安装 VS Code 出现的一个权限拒绝(未解决,原因未知)

在新安装的Ubuntu22.04系统中尝试使用sudo apt安装VSCode时,遇到了权限拒绝的问题,但安装似乎最终成功了,VSCode也能正常启动。错误信息提示'/home/mk/Application/code_1.66.2-1649664567_amd64.deb'文件无法被用户'_apt'访问。尽管如此,VSCode仍然安装完成。
摘要由CSDN通过智能技术生成

文章目录

环境

Ubuntu 版本信息:

$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 22.04 LTS
Release:	22.04
Codename:	jammy

现象

事情是这样子的,今天安装了一个新版本的 Ubuntu 桌面系统,然后开始安装 VS Code,安装的过程出现权限拒绝提示(第 22 行):

$ sudo apt install ./code_1.66.2-1649664567_amd64.deb 
[sudo] password for mk: 
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'code' instead of './code_1.66.2-1649664567_amd64.deb'
The following NEW packages will be installed:
  code
0 upgraded, 1 newly installed, 0 to remove and 18 not upgraded.
Need to get 0 B/82.7 MB of archives.
After this operation, 346 MB of additional disk space will be used.
Get:1 /home/mk/Application/code_1.66.2-1649664567_amd64.deb code amd64 1.66.2-1649664567 [82.7 MB]
Selecting previously unselected package code.
(Reading database ... 195304 files and directories currently installed.)
Preparing to unpack .../code_1.66.2-1649664567_amd64.deb ...
Unpacking code (1.66.2-1649664567) ...
Setting up code (1.66.2-1649664567) ...
Processing triggers for gnome-menus (3.36.0-1ubuntu3) ...
Processing triggers for shared-mime-info (2.1-2) ...
Processing triggers for mailcap (3.70+nmu1ubuntu1) ...
Processing triggers for desktop-file-utils (0.26-1ubuntu3) ...
N: Download is performed unsandboxed as root as file '/home/mk/Application/code_1.66.2-1649664567_amd64.deb' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)

我以为安装失败了,于是重新安装一次:

$ sudo apt install ./code_1.66.2-1649664567_amd64.deb 
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'code' instead of './code_1.66.2-1649664567_amd64.deb'
code is already the newest version (1.66.2-1649664567).
0 upgraded, 0 newly installed, 0 to remove and 18 not upgraded.

但是看样子好像第一次已经安装成功,而且 VS Code 也能顺利启动,不知道第一次安装出现的那个权限拒绝(Permission denied)是因为啥导致的,难道是新版本的原因吗?

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值