You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

WSL Ubuntu 22.04中Conda安装失败求助:bunzip2相关问题

解决WSL Ubuntu 22.04安装Conda时bunzip2缺失问题

核心问题说明

你遇到的bunzip2: command not found是因为系统缺少bzip2工具集,而Ubuntu中bunzip2属于bzip2软件包的一部分,直接安装bunzip2会提示找不到包,因为这个包名不存在。

分步解决方案

  • 更新本地apt软件源索引(确保能找到最新的包列表)
    sudo apt update
    
  • 安装bzip2包(自动包含bunzip2工具)
    sudo apt install bzip2 -y
    
  • 验证工具是否可用
    bunzip2 --version
    
  • 重新执行Anaconda安装脚本
    bash anaconda.sh
    

若更新源后仍无法找到包

如果执行sudo apt update时出现网络错误或源失效,可替换为国内镜像源:

  1. 备份原有源文件
    sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
    
  2. 编辑源文件
    sudo nano /etc/apt/sources.list
    
  3. 将文件内容替换为清华Ubuntu 22.04镜像源:

    deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse
    deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse
    deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse
    deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-security main restricted universe multiverse

  4. 保存退出(按Ctrl+O回车确认,再按Ctrl+X退出)
  5. 再次执行更新和安装命令:
    sudo apt update && sudo apt install bzip2 -y
    

内容的提问来源于stack exchange,提问作者Sukhmeet Sethi

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.29 17:52:37