ubuntu upgrade problem

出现问题:

W: Failed to fetch bzip2:/var/lib/apt/lists/partial/ppa.launchpad.net_webupd8team_java_ubuntu_dists_precise_main_binary-i386_Packages Hash Sum mismatch
W: Failed to fetch bzip2:/var/lib/apt/lists/partial/extras.ubuntu.com_ubuntu_dists_precise_main_binary-i386_Packages Hash Sum mismatch 

E: Some index files failed to download. They have been ignored, or old ones used instead.

 
解决方法:
sudo rm -rf /var/lib/apt/lists/*
sudo rm -rf /var/lib/apt/lists/partial/*
sudo apt-get clean
sudo apt-get update
sudo apt-get update -o Acquire::No-Cache=True
sudo apt-get update -o Acquire::BrokenProxe=True
sudo rm -vf /var/lib/apt/lists/*
 
如果以上均无法解决,建议用官方源。然后搭个goagent(搭建方法利用GAEFQ教程 - appifan.com )。然后用sudo apt-get -o Acquire::http::proxy="http://127.0.0.1:8087/" update,进行更新。用代码更新。更新完再sudo apt-get upgrade。国内的源经常出现一些问题,官方源虽然慢了些,但基本不出错。
在  /etc/environment 中添加环境变量http_proxy="http://127.0.0.1:8087/"(在图形界面配置一样配置,在network中配置)
然后开始升级了。首先,输入以下命令:
sudo apt-get install update-manager-core
而后 修改 /etc/update-manager/release-upgrades
进行简单的编辑,将Prompt的值改为norma
l(其实就是使用图形界面的update,配置一下更新方式)
保存文件,执行命令
sudo do-release-upgrade -d

转载于:https://www.cnblogs.com/tmacy/p/3384894.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
If you encounter the error message "Could not determine the upgrade" while trying to upgrade Ubuntu from 18.04 to 22.04, there could be a few potential reasons for this issue. Here are some possible solutions: 1. Make sure your current Ubuntu 18.04 installation is up to date. Run the following commands to update your system: ``` sudo apt update sudo apt upgrade ``` 2. Check if you have any third-party repositories or PPAs enabled. Disable or remove them temporarily, as they may cause conflicts during the upgrade process. You can use the "Software & Updates" application or manually edit the `/etc/apt/sources.list` file to disable them. 3. Ensure that you have enough free disk space on your system. The upgrade process requires additional space for downloading and installing packages. You can check the available disk space by running the command: ``` df -h ``` 4. Try running the upgrade command with the "--check-dist-upgrade-only" option, which performs a dry-run of the upgrade and checks for any issues without actually initiating the upgrade process. Run the following command: ``` sudo do-release-upgrade --check-dist-upgrade-only ``` 5. If none of the above solutions work, you can try manually editing the release-upgrades configuration file. Open the file `/etc/update-manager/release-upgrades` with a text editor, and change the value of "Prompt" from "lts" to "normal". Save the file and then run the upgrade command again: ``` sudo do-release-upgrade ``` If you still encounter issues, please provide any error messages or logs that you receive during the upgrade process for further assistance.

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值