如何从旧存储库安装软件?

如何从旧存储库安装软件?

我想在运行 Ubuntu Precise 的计算机上安装一个包。

但是,软件包提供商仅“支持” Ubuntu 直到 Lucid。较新的版本可能也受支持,但他们停止更新存储库。可用的最新存储库是

deb http://appscale.cs.ucsb.edu/appscale_packages lucid stable

如果我尝试从该存储库安装包,我会收到此错误,可能是由于版本问题:

$ sudo apt-get install appscale-core
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 appscale-core : Depends: sun-java6-jdk but it is not installable
                 Depends: libboost-filesystem1.40.0 but it is not installable
                 Depends: libboost-serialization1.40.0 but it is not installable
                 Depends: libboost-thread1.40.0 but it is not installable
                 Depends: libboost-program-options1.40.0 but it is not installable
                 Depends: libboost-iostreams1.40.0 but it is not installable
                 Depends: libboost-python1.40.0 but it is not installable
E: Unable to correct problems, you have held broken packages.

我的系统已完全更新和升级,所以我怀疑我确实有损坏的软件包。

我以前遇到过这种情况,我有一个存储库,它只存在到低于当前(LTS)版本的某个版本。

有没有解决这个问题的通用方法?

答案1

您添加

deb http://appscale.cs.ucsb.edu/appscale_packages lucid stable

您的资源,但是您希望系统在哪里找到依赖项?

PPA 要求你安装的软件包

sun-java6-jdk 
libboost-filesystem1.40.0  this yeilds dependencies for:
    libboost-system1.40.0 (>= 1.40.0-1) 
    libc6 (>= 2.3.6-6~) 
    libgcc1 (>= 1:4.1.1)
    libstdc++6 (>= 4.1.1) 
libboost-serialization1.40.0 
libboost-thread1.40.0 
libboost-program-options1.40.0
libboost-iostreams1.40.0 
libboost-python1.40.0 

但是 apt-get 找不到这些软件包,因为我们已迁移到这些软件包的较新版本,自 Lucid 以来它们就不再可用。

建议的安装方法来自 appscale wiki 的内容是:

tar xzvf appscale-tools.tar.gz
cd appscale-tools
sudo bash debian/appscale_build.sh

看看是否有效。

答案2

问题在于您尝试安装的软件包太旧,无法满足其依赖关系。可能是因为您系统中安装的库比软件包所需的库更新,或者它们不再可用(例如sun-java6-jdk)。

我想你有三个选择:

  • 尝试使用提供的 .tar.gz 进行手动安装这里
  • 使用gem安装它(gem类似于apt-getruby​​)。我不知道这是否安装了您需要的内容或只是一些管理工具/库,但您可以尝试一下:

    sudo gem install appscale-tools
    
  • 在 Ubuntu Lucid 系统中安装该软件包,您可以在当前系统中使用虚拟化技术(例如:VirtualBox、LXC,甚至可能chroot有效)

希望这可以帮助。

答案3

在这种情况下,问题不是您的软件包损坏了,而是您尝试安装的软件包显然设计用于与旧版本的软件包一起使用,而不是精确可用的软件包。

这是可能的安装旧.deb文件,忽略依赖性错误sudo dpkg --ignore-depends -i package.deb。但是,这很可能行不通——如果软件包包含任何二进制文件,它们在运行时所需的库版本(从开始glibc并向上工作)将不正确,或者配置文件将位于错误的位置。基本上,您将陷入痛苦之中,它打破了旨在apt确保您的所有软件包相互兼容的要点。

但是,如果您觉得有必要的话,openjdk-6-jdk应该有一个 sun java 的替代品,您可以尝试安装当前版本libboost并创建符号链接来假装安装了旧版本。我会尝试找到一个最新的软件包或从源代码构建它。

相关内容