如何安装 libqtwebkit5?

如何安装 libqtwebkit5?

我如何安装libqtwebkit5库?

我需要它用于 Qt 项目。我尝试过:

$ sudo apt-get install libqtwebkit5
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package libqtwebkit5

我在 12.04 和 13.10 上都遇到了这个问题

答案1

您的包裹名称缺少5,其名称libqt5webkit5不是libqtwebkit5

sudo apt-get install libqt5webkit5
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  xaw3dg xfig-libs
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  libqt53d5 libqt5core5 libqt5dbus5 libqt5gui5 libqt5location5 libqt5network5
  libqt5opengl5 libqt5printsupport5 libqt5qml5 libqt5quick5 libqt5sensors5
  libqt5sql5 libqt5sql5-sqlite libqt5v8-5 libqt5widgets5 libxcb-icccm4
  libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-sync0
The following NEW packages will be installed:
  libqt53d5 libqt5core5 libqt5dbus5 libqt5gui5 libqt5location5 libqt5network5
  libqt5opengl5 libqt5printsupport5 libqt5qml5 libqt5quick5 libqt5sensors5
  libqt5sql5 libqt5sql5-sqlite libqt5v8-5 libqt5webkit5 libqt5widgets5
  libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0
  libxcb-render-util0 libxcb-sync0
0 upgraded, 22 newly installed, 0 to remove and 0 not upgraded.
Need to get 18.4 MB of archives.
After this operation, 71.5 MB of additional disk space will be used.
Do you want to continue [Y/n]? 

答案2

原因是libqtwebkit5它不在 Ubuntu 官方存储库中。libqtwebkit4只有可用的。但有libqt5webkit5。但有可用的仅适用于 13.04 和 13.10。

如果你想拥有qt5webkit 版本 5在 12.04 你可以从ppa:ubuntu-sdk 团队/ppa 存储库

要从中安装,请按照以下步骤操作:

sudo add-apt-repository ppa:ubuntu-sdk-team/ppa

sudo apt-get update

sudo apt-get install qtwebkit-opensource-src

相关内容