Linux Lite Forums

Software - Support => Installing Software => Topic started by: timbuck2 on May 22, 2021, 08:50:37 AM

Title: how to update software not in repo
Post 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.
Title: Re: how to update software not in repo
Post by: trinidad on May 22, 2021, 09:59:33 AM
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
Title: Re: how to update software not in repo
Post by: robert2019 on May 22, 2021, 10:07:13 AM
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.
Title: Re: how to update software not in repo
Post by: timbuck2 on May 22, 2021, 04:44:59 PM
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:

Code: [Select]
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.
Title: Re: how to update software not in repo
Post by: timbuck2 on May 22, 2021, 07:09:45 PM
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).

Code: [Select]
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:

Code: [Select]
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?
Title: Re: how to update software not in repo
Post by: Jerry on May 22, 2021, 09:04:27 PM
(https://imgur.com/jCEJpIM.png)
Title: Re: how to update software not in repo
Post by: timbuck2 on May 22, 2021, 10:25:18 PM
Ok, I give up Jerry, how did you do that?  :shrug

When I run the same command I get:

Code: [Select]
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)
Title: Re: how to update software not in repo
Post by: Jerry on May 22, 2021, 10:59:10 PM
You need to reverse what ever method you installed it with in the first place. Then start fresh with this...

Code: [Select]
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..

Code: [Select]
sudo youtube-dl --update
Title: Re: how to update software not in repo
Post by: timbuck2 on May 23, 2021, 08:41:44 AM
You need to reverse what ever method you installed it with in the first place. Then start fresh with this...

Code: [Select]
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..

Code: [Select]
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.

Code: [Select]
/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:

Code: [Select]
sudo apt-get install python
And it installed "python-is-python2" package and now it works and youtube-dl is up to date.
Title: Re: how to update software not in repo
Post by: Moltke on May 23, 2021, 09:33:22 AM
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
Code: [Select]
cat $(which youtube-dl) for python3 you should see
Code: [Select]
 moltke  ~  cat $(which youtube-dl)
#!/usr/bin/python3
if you instead see this
Code: [Select]
#!/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
Code: [Select]
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.