环境
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)是因为啥导致的,难道是新版本的原因吗?