更改用户名后无法使用 apt-get 进行安装

舒巴姆·潘迪

我最近将我的 ubuntu 帐户的用户名更改为“admin”,之前它曾经是“sunbeam”。现在我正在尝试使用 apt-get 安装 pylint,但出现以下错误

admin@inspiron-5567:~$ sudo apt-get install pylint
[sudo] password for admin: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  blt libtcl8.6 libtk8.6 python-astroid python-backports.functools-lru-cache python-concurrent.futures python-configparser python-egenix-mxdatetime python-egenix-mxtools python-isort python-lazy-object-proxy
  python-logilab-common python-mccabe python-setuptools python-singledispatch python-tk python-wrapt tk8.6-blt2.5
Suggested packages:
  blt-demo tcl8.6 tk8.6 pylint-doc python-egenix-mxdatetime-dbg python-egenix-mxdatetime-doc python-egenix-mxtools-dbg python-egenix-mxtools-doc pyro python-unittest2 python-setuptools-doc tix python-tk-dbg
The following NEW packages will be installed:
  blt libtcl8.6 libtk8.6 pylint python-astroid python-backports.functools-lru-cache python-concurrent.futures python-configparser python-egenix-mxdatetime python-egenix-mxtools python-isort
  python-lazy-object-proxy python-logilab-common python-mccabe python-setuptools python-singledispatch python-tk python-wrapt tk8.6-blt2.5
0 upgraded, 19 newly installed, 0 to remove and 5 not upgraded.
Need to get 0 B/3,667 kB of archives.
After this operation, 21.7 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
WARNING: The following packages cannot be authenticated!
  libtcl8.6 libtk8.6 tk8.6-blt2.5 blt python-lazy-object-proxy python-wrapt python-singledispatch python-backports.functools-lru-cache python-setuptools python-astroid python-concurrent.futures python-isort
  python-mccabe python-configparser python-logilab-common pylint python-egenix-mxtools python-egenix-mxdatetime python-tk
Install these packages without verification? [y/N] y
Get:1 file:/home/sunbeam/subuntu1804  libtcl8.6 8.6.8+dfsg-3 [881 kB]
Err:1 file:/home/sunbeam/subuntu1804  libtcl8.6 8.6.8+dfsg-3
  File not found - /home/sunbeam/subuntu1804/./repo/libtcl8.6_8.6.8+dfsg-3_amd64.deb (2: No such file or directory)
Get:2 file:/home/sunbeam/subuntu1804  libtk8.6 8.6.8-4 [693 kB]
Err:2 file:/home/sunbeam/subuntu1804  libtk8.6 8.6.8-4
  File not found - /home/sunbeam/subuntu1804/./repo/libtk8.6_8.6.8-4_amd64.deb (2: No such file or directory)
Get:3 file:/home/sunbeam/subuntu1804  tk8.6-blt2.5 2.5.3+dfsg-4 [572 kB]
Err:3 file:/home/sunbeam/subuntu1804  tk8.6-blt2.5 2.5.3+dfsg-4
  File not found - /home/sunbeam/subuntu1804/./repo/tk8.6-blt2.5_2.5.3+dfsg-4_amd64.deb (2: No such file or directory)
Get:4 file:/home/sunbeam/subuntu1804  blt 2.5.3+dfsg-4 [4,944 B]
Err:4 file:/home/sunbeam/subuntu1804  blt 2.5.3+dfsg-4
  File not found - /home/sunbeam/subuntu1804/./repo/blt_2.5.3+dfsg-4_amd64.deb (2: No such file or directory)
Get:5 file:/home/sunbeam/subuntu1804  python-lazy-object-proxy 1.3.1-1 [20.8 kB]
Err:5 file:/home/sunbeam/subuntu1804  python-lazy-object-proxy 1.3.1-1
  File not found - /home/sunbeam/subuntu1804/./repo/python-lazy-object-proxy_1.3.1-1_amd64.deb (2: No such file or directory)
Get:6 file:/home/sunbeam/subuntu1804  python-wrapt 1.9.0-3 [27.5 kB]
Err:6 file:/home/sunbeam/subuntu1804  python-wrapt 1.9.0-3
  File not found - /home/sunbeam/subuntu1804/./repo/python-wrapt_1.9.0-3_amd64.deb (2: No such file or directory)
Get:7 file:/home/sunbeam/subuntu1804  python-singledispatch 3.4.0.3-2 [9,848 B]
Err:7 file:/home/sunbeam/subuntu1804  python-singledispatch 3.4.0.3-2
  File not found - /home/sunbeam/subuntu1804/./repo/python-singledispatch_3.4.0.3-2_all.deb (2: No such file or directory)
Get:8 file:/home/sunbeam/subuntu1804  python-backports.functools-lru-cache 1.4-2 [5,960 B]
Err:8 file:/home/sunbeam/subuntu1804  python-backports.functools-lru-cache 1.4-2
  File not found - /home/sunbeam/subuntu1804/./repo/python-backports.functools-lru-cache_1.4-2_all.deb (2: No such file or directory)
Get:9 file:/home/sunbeam/subuntu1804  python-setuptools 39.0.1-2 [329 kB]
Err:9 file:/home/sunbeam/subuntu1804  python-setuptools 39.0.1-2
  File not found - /home/sunbeam/subuntu1804/./repo/python-setuptools_39.0.1-2_all.deb (2: No such file or directory)
Get:10 file:/home/sunbeam/subuntu1804  python-astroid 1.6.0-1 [108 kB]
Err:10 file:/home/sunbeam/subuntu1804  python-astroid 1.6.0-1
  File not found - /home/sunbeam/subuntu1804/./repo/python-astroid_1.6.0-1_all.deb (2: No such file or directory)
Get:11 file:/home/sunbeam/subuntu1804  python-concurrent.futures 3.2.0-1 [34.2 kB]
Err:11 file:/home/sunbeam/subuntu1804  python-concurrent.futures 3.2.0-1
  File not found - /home/sunbeam/subuntu1804/./repo/python-concurrent.futures_3.2.0-1_all.deb (2: No such file or directory)
Get:12 file:/home/sunbeam/subuntu1804  python-isort 4.3.4+ds1-1 [30.4 kB]
Err:12 file:/home/sunbeam/subuntu1804  python-isort 4.3.4+ds1-1
  File not found - /home/sunbeam/subuntu1804/./repo/python-isort_4.3.4+ds1-1_all.deb (2: No such file or directory)
Get:13 file:/home/sunbeam/subuntu1804  python-mccabe 0.6.1-2 [8,092 B]
Err:13 file:/home/sunbeam/subuntu1804  python-mccabe 0.6.1-2
  File not found - /home/sunbeam/subuntu1804/./repo/python-mccabe_0.6.1-2_all.deb (2: No such file or directory)
Get:14 file:/home/sunbeam/subuntu1804  python-configparser 3.5.0-1 [59.6 kB]
Err:14 file:/home/sunbeam/subuntu1804  python-configparser 3.5.0-1
  File not found - /home/sunbeam/subuntu1804/./repo/python-configparser_3.5.0-1_all.deb (2: No such file or directory)
Get:15 file:/home/sunbeam/subuntu1804  python-logilab-common 1.4.1-1 [369 kB]
Err:15 file:/home/sunbeam/subuntu1804  python-logilab-common 1.4.1-1
  File not found - /home/sunbeam/subuntu1804/./repo/python-logilab-common_1.4.1-1_all.deb (2: No such file or directory)
Get:16 file:/home/sunbeam/subuntu1804  pylint 1.8.3-1 [342 kB]
Err:16 file:/home/sunbeam/subuntu1804  pylint 1.8.3-1
  File not found - /home/sunbeam/subuntu1804/./repo/pylint_1.8.3-1_all.deb (2: No such file or directory)
Get:17 file:/home/sunbeam/subuntu1804  python-egenix-mxtools 3.2.9-1 [75.3 kB]
Err:17 file:/home/sunbeam/subuntu1804  python-egenix-mxtools 3.2.9-1
  File not found - /home/sunbeam/subuntu1804/./repo/python-egenix-mxtools_3.2.9-1_amd64.deb (2: No such file or directory)
Get:18 file:/home/sunbeam/subuntu1804  python-egenix-mxdatetime 3.2.9-1 [68.3 kB]
Err:18 file:/home/sunbeam/subuntu1804  python-egenix-mxdatetime 3.2.9-1
  File not found - /home/sunbeam/subuntu1804/./repo/python-egenix-mxdatetime_3.2.9-1_amd64.deb (2: No such file or directory)
Get:19 file:/home/sunbeam/subuntu1804  python-tk 2.7.15~rc1-1 [25.9 kB]
Err:19 file:/home/sunbeam/subuntu1804  python-tk 2.7.15~rc1-1
  File not found - /home/sunbeam/subuntu1804/./repo/python-tk_2.7.15~rc1-1_amd64.deb (2: No such file or directory)
E: Failed to fetch file:/home/sunbeam/subuntu1804/./repo/libtcl8.6_8.6.8+dfsg-3_amd64.deb  File not found - /home/sunbeam/subuntu1804/./repo/libtcl8.6_8.6.8+dfsg-3_amd64.deb (2: No such file or directory)
E: Failed to fetch file:/home/sunbeam/subuntu1804/./repo/libtk8.6_8.6.8-4_amd64.deb  File not found - /home/sunbeam/subuntu1804/./repo/libtk8.6_8.6.8-4_amd64.deb (2: No such file or directory)
E: Failed to fetch file:/home/sunbeam/subuntu1804/./repo/tk8.6-blt2.5_2.5.3+dfsg-4_amd64.deb  File not found - /home/sunbeam/subuntu1804/./repo/tk8.6-blt2.5_2.5.3+dfsg-4_amd64.deb (2: No such file or directory)
E: Failed to fetch file:/home/sunbeam/subuntu1804/./repo/blt_2.5.3+dfsg-4_amd64.deb  File not found - /home/sunbeam/subuntu1804/./repo/blt_2.5.3+dfsg-4_amd64.deb (2: No such file or directory)
E: Failed to fetch file:/home/sunbeam/subuntu1804/./repo/python-lazy-object-proxy_1.3.1-1_amd64.deb  File not found - /home/sunbeam/subuntu1804/./repo/python-lazy-object-proxy_1.3.1-1_amd64.deb (2: No such file or directory)
E: Failed to fetch file:/home/sunbeam/subuntu1804/./repo/python-wrapt_1.9.0-3_amd64.deb  File not found - /home/sunbeam/subuntu1804/./repo/python-wrapt_1.9.0-3_amd64.deb (2: No such file or directory)
E: Failed to fetch file:/home/sunbeam/subuntu1804/./repo/python-singledispatch_3.4.0.3-2_all.deb  File not found - /home/sunbeam/subuntu1804/./repo/python-singledispatch_3.4.0.3-2_all.deb (2: No such file or directory)
E: Failed to fetch file:/home/sunbeam/subuntu1804/./repo/python-backports.functools-lru-cache_1.4-2_all.deb  File not found - /home/sunbeam/subuntu1804/./repo/python-backports.functools-lru-cache_1.4-2_all.deb (2: No such file or directory)
E: Failed to fetch file:/home/sunbeam/subuntu1804/./repo/python-setuptools_39.0.1-2_all.deb  File not found - /home/sunbeam/subuntu1804/./repo/python-setuptools_39.0.1-2_all.deb (2: No such file or directory)
E: Failed to fetch file:/home/sunbeam/subuntu1804/./repo/python-astroid_1.6.0-1_all.deb  File not found - /home/sunbeam/subuntu1804/./repo/python-astroid_1.6.0-1_all.deb (2: No such file or directory)
E: Failed to fetch file:/home/sunbeam/subuntu1804/./repo/python-concurrent.futures_3.2.0-1_all.deb  File not found - /home/sunbeam/subuntu1804/./repo/python-concurrent.futures_3.2.0-1_all.deb (2: No such file or directory)
E: Failed to fetch file:/home/sunbeam/subuntu1804/./repo/python-isort_4.3.4+ds1-1_all.deb  File not found - /home/sunbeam/subuntu1804/./repo/python-isort_4.3.4+ds1-1_all.deb (2: No such file or directory)
E: Failed to fetch file:/home/sunbeam/subuntu1804/./repo/python-mccabe_0.6.1-2_all.deb  File not found - /home/sunbeam/subuntu1804/./repo/python-mccabe_0.6.1-2_all.deb (2: No such file or directory)
E: Failed to fetch file:/home/sunbeam/subuntu1804/./repo/python-configparser_3.5.0-1_all.deb  File not found - /home/sunbeam/subuntu1804/./repo/python-configparser_3.5.0-1_all.deb (2: No such file or directory)
E: Failed to fetch file:/home/sunbeam/subuntu1804/./repo/python-logilab-common_1.4.1-1_all.deb  File not found - /home/sunbeam/subuntu1804/./repo/python-logilab-common_1.4.1-1_all.deb (2: No such file or directory)
E: Failed to fetch file:/home/sunbeam/subuntu1804/./repo/pylint_1.8.3-1_all.deb  File not found - /home/sunbeam/subuntu1804/./repo/pylint_1.8.3-1_all.deb (2: No such file or directory)
E: Failed to fetch file:/home/sunbeam/subuntu1804/./repo/python-egenix-mxtools_3.2.9-1_amd64.deb  File not found - /home/sunbeam/subuntu1804/./repo/python-egenix-mxtools_3.2.9-1_amd64.deb (2: No such file or directory)
E: Failed to fetch file:/home/sunbeam/subuntu1804/./repo/python-egenix-mxdatetime_3.2.9-1_amd64.deb  File not found - /home/sunbeam/subuntu1804/./repo/python-egenix-mxdatetime_3.2.9-1_amd64.deb (2: No such file or directory)
E: Failed to fetch file:/home/sunbeam/subuntu1804/./repo/python-tk_2.7.15~rc1-1_amd64.deb  File not found - /home/sunbeam/subuntu1804/./repo/python-tk_2.7.15~rc1-1_amd64.deb (2: No such file or directory)
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

我已经使用了如何更改管理员用户名?将我的用户名从“sunbeam”更改为“admin”,但现在当我使用“apt-get”安装任何东西时,它会尝试从/home/sunbeam/subuntu1804/./repo/..获取文件,这显然没有' t 现在存在,因为 sunbeam 被重命名为 admin。所以我的问题是如何在文件路径改变时使用 apt-get 安装任何东西?

我该如何解决这个问题?

吉韦克

以下来自评论

在我看来,您的源 ( /etc/apt/sources) 中的条目不正确,您需要将指向旧用户目录的条目修改为新的 $HOME 路径(我假设您将旧目录硬编码为源现在变了

命令

grep sunbeam /etc/apt/sources.list 

我希望不会产生任何结果。如果是这样;这些需要更改以反映您的新 $HOME 目录名称。

我认为最快的解决方法是编辑文件并使其反映新目录。我会用

sudo vim /etc/apt/sources.list

但是你可以vim用你最喜欢的编辑器替换,或者用sed(stream-edit) 等更改文件

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章