如何在更新 Ubuntu 时查找软件包并创建标准 source.list 文件

如何在更新 Ubuntu 时查找软件包并创建标准 source.list 文件

我刚刚升级到Ubuntu 14.04 LTS, amd64。我正在尝试安装一些软件,它说对于Ubuntu 13.10及以上版本,需要安装以下库才能兼容 32 位组件:

sudo apt-get install libgtk2.0-0:i386 libxtst6:i386 libpangox-1.0-0:i386 \
libpangoxft-1.0-0:i386 libidn11:i386 libglu1-mesa:i386 \
libncurses5:i386 libudev1:i386 libusb-1.0:i386 libusb-0.1:i386 \
gtk2-engines-murrine:i386

我知道当我Ubuntu 13.10能够下载这些软件包时,但现在我更新了,却找不到这些软件包:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package libgtk2.0-0
E: Couldn't find any package by regex 'libgtk2.0-0'

我该如何在 中找到这些软件包Ubuntu 14.04 LTS, amd64?为什么我在 13.10 中可以找到它们,而在 14.04 中却不存在了?这些东西被重命名并移动了吗?我该如何找出并解决这个问题?人们在更新 Ubuntu 时如何解决这些问题?提前致谢。

编辑

运行下面建议的命令时出现此错误消息:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package libgtk2.0-0
E: Couldn't find any package by regex 'libgtk2.0-0'
E: Unable to locate package libxtst6
E: Unable to locate package libpangox-1.0-0
E: Couldn't find any package by regex 'libpangox-1.0-0'
E: Unable to locate package libpangoxft-1.0-0
E: Couldn't find any package by regex 'libpangoxft-1.0-0'
E: Unable to locate package libidn11
E: Unable to locate package libglu1-mesa
E: Unable to locate package libncurses5
E: Unable to locate package libudev1
E: Unable to locate package libusb-1.0
E: Couldn't find any package by regex 'libusb-1.0'
E: Unable to locate package libusb-0.1
E: Couldn't find any package by regex 'libusb-0.1'
E: Unable to locate package gtk2-engines-murrine

答案1

此命令会自动安装i386

sudo dpkg --add-architecture i386
sudo apt-get update

如果要删除i386库:

sudo dpkg --remove-architecture i386

来源:Debian 多架构指南

如果仍然不起作用,请创建新sources.listhttp://repogen.simplylinux.ch。这是您需要的标准、干净的sources.list

在此处输入图片描述

在此处输入图片描述

始终备份当前文件:

sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup

恢复方式:

sudo mv /etc/apt/sources.list.backup /etc/apt/sources.list

相关内容