无法使用 aptitude 从 trusty 下载 libprotobuf8

无法使用 aptitude 从 trusty 下载 libprotobuf8

我正在运行 Ubuntu 17.04,“zesty”。

我需要安装 Google Protocol Buffer 8 版本。

我可以在https://packages.ubuntu.com/trusty/amd64/libprotobuf8/download

说明书指出 aptitude 是下载和安装该软件包的首选方式。

我在末尾添加了以下行/etc/apt/sources.list

deb http://mirrors.kernel.org/ubuntu/pool/main/p/protobuf trusty main 

然后我运行 aptitude:

$ sudo aptitude install libprotobuf8=libprotobuf8_2.5.0-9ubuntu1_amd64.deb
Unable to find a version "libprotobuf8_2.5.0-9ubuntu1_amd64.deb" for the package "libprotobuf8"
Unable to apply some actions, aborting

$ sudo aptitude install libprotobuf8=2.5.0-9ubuntu1
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 6 not upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.

使用 apt-get 也不起作用:

$ sudo apt-get install libprotobuf8=2.5.0-9ubuntu1
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Can't find a source to download version '2.5.0-9ubuntu1' of 'libprotobuf8:amd64'

当我跑步时sudo apt-get update

我懂了

...
Err:3 http://mirrors.kernel.org/ubuntu/pool/main/p/protobuf trusty/main amd64 Packages                                
  404  Not Found
...

W: The repository 'http://mirrors.kernel.org/ubuntu/pool/main/p/protobuf trusty Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Failed to fetch http://mirrors.kernel.org/ubuntu/pool/main/p/protobuf/dists/trusty/main/binary-amd64/Packages  404  Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead.

尽管如此,/var/lib/dpkg/status显示:

Package: libprotobuf8
Status: install ok config-files
Section: libs
Installed-Size: 1083
Architecture: amd64
Multi-Arch: same
Source: protobuf
Version: 2.5.0-9ubuntu1
Config-Version: 2.5.0-9ubuntu1
Depends: libc6 (>= 2.14), libgcc1 (>= 1:4.1.1), libstdc++6 (>= 4.3), zlib1g (>= 1:1.1.4)
 This package contains the runtime library needed for C++ applications.
Homepage: https://code.google.com/p/protobuf/
Original-Maintainer: Robert S. Edmonds <[email protected]>

但是我在系统上的任何地方都找不到 libprotobuf.so.8。

我究竟做错了什么?

答案1

无法使用建议的答案进行安装,因此从以下位置下载了文件http://mirrors.kernel.org/ubuntu/pool/main/p/protobuf

sudo apt install ./libprotobuf8_2.5.0-9ubuntu1_amd64.deb

答案2

  1. libprotobuf8 已在 ubuntu 存储库中,您只需使用包管理器 apt-get 或 aptitude 即可轻松安装它。例如:

    sudo apt-get install libprotobuf8

  2. 你添加的那个源基本上是无用的或不需要的,我会将其删除

  3. 指定软件包版本时,只需使用版本,而不是名称,当然也不是 .deb 名称。例如

    sudo aptitude install libprotobuf8=2.5.0-9ubuntu1

相关内容