2

I installed YouTube-dl through Ubuntu Software Center, but now mine isn't working. So I can not able to Update and Install youtube-dl. I tried this:

$ sudo add-apt-repository ppa:nilarimogard/webupd8
$ sudo apt-get update
$ sudo apt-get install youtube-dl

then following errors occurs......

$ 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.

How can I uninstall and install Youtube-dl by using terminal only?

  • 1
    First fix the error you are encountering using this post. What version of youtube-dl are you currently using (you can use youtube-dl --version for that)? – Wilf Jun 3 '15 at 14:58
  • @Wilf thanks it working with no errors. I try below commands sudo rm /var/lib/apt/lists/* -vf sudo apt-get update what should do next? – Madhav Nikam Jun 3 '15 at 15:16
  • error occur al last W: Failed to fetch in.archive.ubuntu.com/ubuntu/dists/trusty-updates/main/i18n/… Hash Sum mismatch – Madhav Nikam Jun 3 '15 at 15:24
  • W: Failed to fetch in.archive.ubuntu.com/ubuntu/dists/trusty-updates/universe/i18n/… Hash Sum mismatch E: Some index files failed to download. They have been ignored, or old ones used instead. – Madhav Nikam Jun 3 '15 at 15:25
  • You can use the edit button to add information to your question.... are you connected to the internet via a proxy? /var/lib/apt/lists/ should be empty after running the first command – Wilf Jun 3 '15 at 16:19
5

Try pip command to upgrade youtube-dl

sudo pip install --upgrade youtube-dl

If you get this message:

sudo: pip: command not found

Then first install pip:

sudo apt-get install python-setuptools
sudo easy_install pip
sudo pip install --upgrade youtube-dl
2

I solve the problem by using these commands:

  1. sudo apt-get remove youtube-dl

    remove youtube-dl

    After that:

  2. sudo apt-get install youtube-dl

    install youtube-dl

  3. Downloading play-list...

    youtube-dl -cit --extract-audio --audio-format mp3 https://www.youtube.com/playlist?list=PLttJ4RON7sleuL8wDpxbKHbSJ7BH4vvCk
    

    downloading playlist by Youtube-dl

Done.

1

It would be easier to use --reinstall

sudo apt-get install --reinstall youtube-dl

then use it:

 youtube-dl -cit --extract-audio --audio-format mp3 https://www.youtube.com/playlist?list=PLttJ4RON7sleuL8wDpxbKHbSJ7BH4vvCk
  • So why the downvote? – Maythux Jun 4 '15 at 7:55
1

Why you don't use the recommended official way to install youtube-dl? Very useful since very often you will need to update it (sudo youtube-dl -U) to bleeding edge stable version to keep it working:

sudo wget https://yt-dl.org/downloads/latest/youtube-dl -O /usr/local/bin/youtube-dl

sudo chmod a+rx /usr/local/bin/youtube-dl

And here you'll find a bash script I made for batch downloading getting track names from a text file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.