如何使用终端卸载/安装 youtube-dl

Mad*_*kam 3 update-manager command-line apt ppa youtube-dl

我通过 Ubuntu 软件中心安装了YouTube-dl,但现在我的无法正常工作。所以我无法更新和安装 youtube-dl。我试过这个:

$ sudo add-apt-repository ppa:nilarimogard/webupd8
$ sudo apt-get update
$ sudo apt-get install youtube-dl
Run Code Online (Sandbox Code Playgroud)

然后出现以下错误......

$ youtube-dl --version
2014.02.17
$ sudo add-apt-repository ppa:nilarimogard/webupd8
[sudo] password for madhavnikam: 
 The main Web Upd8 PPA maintained by: http://www.webupd8.org/

To add this PPA, simply paste this in a terminal:
sudo add-apt-repository ppa:nilarimogard/webupd8

Packages in this PPA: audacious, ap-hotspot, awn-applet-radio, awn-applet-wm, calise, cmus, dockbarx, dockbarx-themes-extra, dropbox-share, emerald, exaile, fbmessenger, gnome-subtitles, gnome-window-applets, grsync, grive, gthumb, launchpad-getkeys, mc, mdm (Mint Display Manager), minitunes, minitube, musique, notifyosdconfig, nautilus-columns, powertop, ppa-purge, rosa-media-player, fixed pulseaudio-equalizer, subtitleeditor, syncwall, umplayer, unity-reboot, wimlib, youtube-dl, xfce4-dockbarx-plugin, xournal, yad and others. Almost all packages are updated to their latest version.

For other (specialized) PPAs we maintain, see: https://launchpad.net/~webupd8team
 More info: https://launchpad.net/~nilarimogard/+archive/ubuntu/webupd8
Press [ENTER] to continue or ctrl-c to cancel adding it

gpg: keyring `/tmp/tmpl8q4d9le/secring.gpg' created
gpg: keyring `/tmp/tmpl8q4d9le/pubring.gpg' created
gpg: requesting key 4C9D234C from hkp server keyserver.ubuntu.com
gpg: /tmp/tmpl8q4d9le/trustdb.gpg: trustdb created
gpg: key 4C9D234C: public key "Launchpad webupd8" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
OK
$ sudo apt-get update
Ign http://in.archive.ubuntu.com trusty InRelease                              
[...]
Ign http://in.archive.ubuntu.com trusty/universe Translation-en_IN
Fetched 1,784 kB in 1min 29s (20.0 kB/s)
Reading package lists... Error!
E: Encountered a section with no Package: header
E: Problem with MergeList /var/lib/apt/lists/in.archive.ubuntu.com_ubuntu_dists_trusty_main_i18n_Translation-en
E: The package lists or status file could not be parsed or opened.
$ sudo apt-get install youtube-dl
Reading package lists... Error!
E: Encountered a section with no Package: header
E: Problem with MergeList /var/lib/apt/lists/in.archive.ubuntu.com_ubuntu_dists_trusty_main_i18n_Translation-en
E: The package lists or status file could not be parsed or opened.

$ youtube-dl -U
It looks like you installed youtube-dl with a package manager, pip, setup.py or a tarball. Please use that to update.
Run Code Online (Sandbox Code Playgroud)

如何仅使用终端卸载和安装 Youtube-dl?

sno*_*oop 6

尝试pip命令升级youtube-dl

sudo pip install --upgrade youtube-dl
Run Code Online (Sandbox Code Playgroud)

如果您收到此消息:

sudo: pip: command not found
Run Code Online (Sandbox Code Playgroud)

然后首先安装pip

sudo apt-get install python-setuptools
sudo easy_install pip
sudo pip install --upgrade youtube-dl
Run Code Online (Sandbox Code Playgroud)


Mad*_*kam 5

我通过使用这些命令解决了这个问题:

  1. sudo apt-get remove youtube-dl

    删除 youtube-dl

    在那之后:

  2. sudo apt-get install youtube-dl

    安装 youtube-dl

  3. 正在下载播放列表...

    youtube-dl -cit --extract-audio --audio-format mp3 https://www.youtube.com/playlist?list=PLttJ4RON7sleuL8wDpxbKHbSJ7BH4vvCk
    
    Run Code Online (Sandbox Code Playgroud)

    通过 Youtube-dl 下载播放列表

完毕。