首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >终端找不到命令,下载(wget)不能工作。

终端找不到命令,下载(wget)不能工作。
EN

Ask Ubuntu用户
提问于 2022-07-08 11:15:21
回答 1查看 101关注 0票数 0

我想我已经损坏了我的Ubuntu安装,因为它现在没有识别一些终端命令,比如ufw/ some (已经安装了)。结果如下。

代码语言:javascript
复制
-bash: ufw: command not found

另外,sudo apt update --fix-missing不起作用,因为它提供了以下结果。

代码语言:javascript
复制
Err:1 http://security.ubuntu.com/ubuntu focal-security InRelease
  Temporary failure resolving 'security.ubuntu.com'
Err:2 http://lk.archive.ubuntu.com/ubuntu focal InRelease                                                       
  Temporary failure resolving 'lk.archive.ubuntu.com'
Err:3 http://gb.archive.ubuntu.com/ubuntu bionic InRelease                                                      
  Temporary failure resolving 'gb.archive.ubuntu.com'
Err:4 http://ppa.launchpad.net/deadsnakes/ppa/ubuntu focal InRelease      
  Temporary failure resolving 'ppa.launchpad.net'
Err:5 http://lk.archive.ubuntu.com/ubuntu focal-updates InRelease
  Temporary failure resolving 'lk.archive.ubuntu.com'
Err:6 http://ppa.launchpad.net/gluster/glusterfs-3.12/ubuntu focal InRelease
  Temporary failure resolving 'ppa.launchpad.net'
Err:7 http://lk.archive.ubuntu.com/ubuntu focal-backports InRelease
  Temporary failure resolving 'lk.archive.ubuntu.com'
Err:8 http://ppa.launchpad.net/gluster/glusterfs-6/ubuntu focal InRelease
  Temporary failure resolving 'ppa.launchpad.net'
Reading package lists... Done       
Building dependency tree       
Reading state information... Done
All packages are up to date.
W: Failed to fetch http://lk.archive.ubuntu.com/ubuntu/dists/focal/InRelease  Temporary failure resolving 'lk.archive.ubuntu.com'
W: Failed to fetch http://lk.archive.ubuntu.com/ubuntu/dists/focal-updates/InRelease  Temporary failure resolving 'lk.archive.ubuntu.com'
W: Failed to fetch http://lk.archive.ubuntu.com/ubuntu/dists/focal-backports/InRelease  Temporary failure resolving 'lk.archive.ubuntu.com'W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/focal-security/InRelease  Temporary failure resolving 'security.ubuntu.com'
W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/bionic/InRelease  Temporary failure resolving 'gb.archive.ubuntu.com'
W: Failed to fetch http://ppa.launchpad.net/deadsnakes/ppa/ubuntu/dists/focal/InRelease  Temporary failure resolving 'ppa.launchpad.net'
W: Failed to fetch http://ppa.launchpad.net/gluster/glusterfs-3.12/ubuntu/dists/focal/InRelease  Temporary failure resolving 'ppa.launchpad.net'
W: Failed to fetch http://ppa.launchpad.net/gluster/glusterfs-6/ubuntu/dists/focal/InRelease  Temporary failure resolving 'ppa.launchpad.net'
W: Some index files failed to download. They have been ignored, or old ones used instead.

这发生在我试图将python版本从3.8降到3.5以运行一个特定的程序时,在ubuntu20.2中。我只看到一些评论,并没有建议程序有点晚,现在已经太晚了。

注意:我的路径如下所示,(and it contains bin, /usr/bin and /usr/local/bin)

代码语言:javascript
复制
/home/chameera/.local/bin:/opt/lib/mpich/bin:/opt/lib/netcdf/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
  • 使用wget,不能下载任何文件,但可以使用ssh进出机器,以及传输文件。
  • ping到8.8.8.8响应,但不响应www.google.com
  • sudo dpkg --configure -a在清除sudo rm /var/lib/apt/lists/locksudo rm /var/lib/dpkg/locksudo rm /var/lib/dpkg/lock-frontendsudo rm /var/lib/apt/lists/* -vf中的锁文件后不会生成任何输出。

我还没有重新启动这台机器,因为它是一台远程机器,我有点担心这样做,担心我可能会再次失去对它的访问,直到我身体恢复机器。如果你们能在这方面帮助我,我将不胜感激。

提前谢谢你!

EN

回答 1

Ask Ubuntu用户

发布于 2022-07-08 20:40:00

你需要撤销你对python的降级,我不知道你是怎么做到的。

修复后,我建议使用蟒蛇来管理其他python版本(永远不要碰系统python!)或者在另一个目录树(如CPython )中单独安装/opt/python/<version>。使用后一种选项,您可以使用环境模块Lmod轻松地交换进出的软件版本,类似于python虚拟环境或conda环境。

票数 1
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/1417775

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档