我需要 handbrake-cli 工具,但我认为它不包含在标准的 Ubuntu 存储库中,因此我遵循了这个指导。
添加存储库
sudo apt-get install ubuntu-restricted-extras
sudo apt-get install libdvdread4
sudo /usr/share/doc/libdvdread4/install-css.sh
sudo apt-get install python-software-properties
sudo apt-add-repository ppa:stebbins/handbrake-snapshots
sudo apt-get update
没有错误,一切似乎都很好。
安装过程中一切似乎都很顺利:
jdoe@jdoe:~$ sudo apt-get install -y handbrake-cli handbrake-gtk
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
libjansson4
The following NEW packages will be installed:
handbrake-cli handbrake-gtk libjansson4
0 upgraded, 3 newly installed, 0 to remove and 3 not upgraded.
Need to get 16.6 MB of archives.
After this operation, 36.5 MB of additional disk space will be used.
Get:1 http://dk.archive.ubuntu.com/ubuntu/ trusty/universe libjansson4 amd64 2.5-2 [25.2 kB]
Get:2 http://ppa.launchpad.net/stebbins/handbrake-snapshots/ubuntu/ trusty/main handbrake-cli amd64 7352svnppa1~trusty1 [5,705 kB]
Get:3 http://ppa.launchpad.net/stebbins/handbrake-snapshots/ubuntu/ trusty/main handbrake-gtk amd64 7352svnppa1~trusty1 [10.8 MB]
Fetched 16.6 MB in 5s (2,930 kB/s)
Selecting previously unselected package libjansson4:amd64.
(Reading database ... 247827 files and directories currently installed.)
Preparing to unpack .../libjansson4_2.5-2_amd64.deb ...
Unpacking libjansson4:amd64 (2.5-2) ...
Selecting previously unselected package handbrake-cli.
Preparing to unpack .../handbrake-cli_7352svnppa1~trusty1_amd64.deb ...
Unpacking handbrake-cli (7352svnppa1~trusty1) ...
Selecting previously unselected package handbrake-gtk.
Preparing to unpack .../handbrake-gtk_7352svnppa1~trusty1_amd64.deb ...
Unpacking handbrake-gtk (7352svnppa1~trusty1) ...
Processing triggers for gnome-menus (3.10.1-0ubuntu2) ...
Processing triggers for desktop-file-utils (0.22-1ubuntu1) ...
Processing triggers for bamfdaemon (0.5.1+14.04.20140409-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for mime-support (3.54ubuntu1.1) ...
Processing triggers for hicolor-icon-theme (0.13-1) ...
Setting up libjansson4:amd64 (2.5-2) ...
Setting up handbrake-cli (7352svnppa1~trusty1) ...
Setting up handbrake-gtk (7352svnppa1~trusty1) ...
Processing triggers for libc-bin (2.19-0ubuntu6.6) ...
但之后只安装了一些文档
jdoe@jdoe:~$ handbrake
The program 'handbrake' is currently not installed. You can install it by typing:
sudo apt-get install handbrake
jdoe@jdoe:~$ handbrake-gtk
The program 'handbrake-gtk' is currently not installed. You can install it by typing:
sudo apt-get install handbrake
jdoe@jdoe:~$ handbrake-cli
handbrake-cli: command not found
jdoe@jdoe:~$ locate handbrake
/etc/apt/sources.list.d/stebbins-handbrake-snapshots-trusty.list
/etc/apt/trusted.gpg.d/stebbins-handbrake-snapshots.gpg
/etc/apt/trusted.gpg.d/stebbins-handbrake-snapshots.gpg~
/usr/share/app-install/desktop/handbrake:ghb.desktop
/usr/share/doc/handbrake-cli
/usr/share/doc/handbrake-gtk
/usr/share/doc/handbrake-cli/AUTHORS
/usr/share/doc/handbrake-cli/CREDITS
/usr/share/doc/handbrake-cli/NEWS.gz
/usr/share/doc/handbrake-cli/README.Debian
/usr/share/doc/handbrake-cli/THANKS
/usr/share/doc/handbrake-cli/changelog.gz
/usr/share/doc/handbrake-cli/copyright
/usr/share/doc/handbrake-gtk/changelog.gz
/usr/share/doc/handbrake-gtk/copyright
/var/cache/apt/archives/handbrake-cli_7352svnppa1~trusty1_amd64.deb
/var/cache/apt/archives/handbrake-gtk_7352svnppa1~trusty1_amd64.deb
/var/lib/apt/lists/ppa.launchpad.net_stebbins_handbrake-snapshots_ubuntu_dists_trusty_Release
/var/lib/apt/lists/ppa.launchpad.net_stebbins_handbrake-snapshots_ubuntu_dists_trusty_Release.gpg
/var/lib/apt/lists/ppa.launchpad.net_stebbins_handbrake-snapshots_ubuntu_dists_trusty_main_binary-amd64_Packages
/var/lib/apt/lists/ppa.launchpad.net_stebbins_handbrake-snapshots_ubuntu_dists_trusty_main_binary-i386_Packages
/var/lib/apt/lists/ppa.launchpad.net_stebbins_handbrake-snapshots_ubuntu_dists_trusty_main_i18n_Translation-en
/var/lib/dpkg/info/handbrake-cli.list
/var/lib/dpkg/info/handbrake-cli.md5sums
/var/lib/dpkg/info/handbrake-gtk.list
/var/lib/dpkg/info/handbrake-gtk.md5sums
还有一个问题
为什么默认 Ubuntu 存储库中的 handbrake 包中不包含 handbrake-cli?也许,这有一个很好的理由,我应该知道 :)
答案1
首先,您正在尝试使用适用于 Ubuntu 12.04 的方法当您使用 Ubuntu 14.04 时,这通常不起作用。
其次要注意的是,在 Ubuntu 12.04 中,命令是命名的ghb
,而不是handbrake
。
第三个handrake-cli
已经在宇宙的默认 PPA 中建立。
现在要在 Ubuntu 14.04 中正确安装 Handbrake,只需运行以下命令:
sudo apt-get install handbrake handbrake-cli
但在此之前,请删除ppa:stebbins/handbrake-snapshots
存储库。
sudo apt-get install ppa-purge
sudo ppa-purge ppa:stebbins/handbrake-snapshots
更新:
如果你想使用 stebbins repo:
sudo add-apt-repository ppa:stebbins/handbrake-releases
sudo apt-get update
sudo apt-get install handbrake handbrake-cli