Linux Lite Forums
Software - Support => Installing Software => Topic started by: timbuck2 on May 22, 2021, 08:50:37 AM
-
So youtube changed their api or something and the youtube-dl version in LL 5.4 (2020.03.24-1) doesn't work anymore. This version is over a year old and out of date. There is a new 2021.05.16 which is the current version.
How would I install this new version on my system when it is not in the repo provided by LL? Do I have to uninstall the repo version and build the current version manually? Any help would be appreciated.
-
Be advised You-Tube is in a state of flux these days over changes in EU copyright law, and I expect it to continue to be annoying to the free software community. You can use snapd to install the latest version for Ubuntu 20.x. See the link.
https://snapcraft.io/install/youtube-dl/ubuntu
TC
-
HI timbuck2,
You might also try
sudo youtube-dl -U
enter your password
To verify it got updated code now:
youtube-dl --version
Hope it helps.
-
Be advised You-Tube is in a state of flux these days over changes in EU copyright law, and I expect it to continue to be annoying to the free software community. You can use snapd to install the latest version for Ubuntu 20.x. See the link.
https://snapcraft.io/install/youtube-dl/ubuntu
TC
Ok, I will check the link and read about it. Thanks for the tip.
HI timbuck2,
You might also try
sudo youtube-dl -U
enter your password
To verify it got updated code now:
youtube-dl --version
Hope it helps.
Yes, I had tried that first before I posted here. I got the following message when I tried:
youtube-dl: error: youtube-dl's self-update mechanism is disabled on Debian.
Please update youtube-dl using apt(8).
See https://packages.debian.org/sid/youtube-dl for the latest packaged version.
-
Ok, I installed snapd (it is not installed by default on LL 5.4) and ran the command to install youtube-dl with it (after completely removing the older one in synaptics I had installed previously).
sudo snap install youtube-dl
This resulted in version 2021.01.16 being installed which is newer than the one in synaptics, but not the newest 2021.05.16.
"youtube-dl -U" still won't update it and replies:
It looks like you installed youtube-dl with a package manager, pip, setup.py or a tarball. Please use that to update.
Do I need to download and compile the newest version manually?
-
(https://imgur.com/jCEJpIM.png)
-
Ok, I give up Jerry, how did you do that? :shrug
When I run the same command I get:
youtube-dl: error: youtube-dl's self-update mechanism is disabled on Debian.
Please update youtube-dl using apt(8).
See https://packages.debian.org/sid/youtube-dl for the latest packaged version.
(https://i.postimg.cc/Hx3022kL/youtube-dl.png)
-
You need to reverse what ever method you installed it with in the first place. Then start fresh with this...
sudo curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl
sudo chmod a+rx /usr/local/bin/youtube-dl
Then updates are simply..
sudo youtube-dl --update
-
You need to reverse what ever method you installed it with in the first place. Then start fresh with this...
sudo curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl
sudo chmod a+rx /usr/local/bin/youtube-dl
Then updates are simply..
sudo youtube-dl --update
Ok, nice...so I uninstalled the version I had and then used the commands you posted to install from yt-dl.org. Afterwards, I got the error when trying to --update or --version the program.
/usr/bin/env: ‘python’: No such file or directory
I was like what? Isn't python installed by default on every system these days? :shrug
But I went ahead and tried this:
sudo apt-get install python
And it installed "python-is-python2" package and now it works and youtube-dl is up to date.
-
I know it's been marked as solved and everything, but I just wanted to add that this /usr/bin/env: ‘python’: No such file or directory message error, doesn't have to do with python not being installed, but youtube-dl still looking for python2, which is deprecated and that's why when you installed the pkg python-is-python2 youtube-dl worked. You can verify with
cat $(which youtube-dl)
for python3 you should see
moltke ~ cat $(which youtube-dl)
#!/usr/bin/python3
if you instead see this #!/usr/bin/env python
which you probably will, then youtube-dl is indeed looking for python2. This pkg http://archive.ubuntu.com/ubuntu/ubuntu/pool/universe/y/youtube-dl/youtube-dl_2021.04.07-0ubuntu1_all.deb has that line set properly pointing to python3.
Also, this
youtube-dl: error: youtube-dl's self-update mechanism is disabled on Debian.
Please update youtube-dl using apt(8).
See https://packages.debian.org/sid/youtube-dl for the latest packaged version.
Is because of youtube api changes made by google, which they do quite often.