The officially official Devuan Forum!

You are not logged in.

#1 2022-08-29 05:54:37

wingcommander1999
Member
Registered: 2020-04-14
Posts: 25  

[HowTo] Install latest youtube-dl on DEVUAN 4

youtube-dl are a program in command line to download video from youtube and many other sites.

Source

youtube-dl needs the python3-pip package for upgrading it, but since January 1st 2020 Python 2.7 reaches end of life after 20 years of development.
(Source)

This is the error message after classic installation, if no python 2.7 are availlable in the sources:

" /usr/bin/env: ‘python’: No such file or directory"

To solve this issue we need two things, python3-pip package and change the path to work fine.

At first download the python3-pip package like:

sudo apt install python3-pip -y

We can install latest youtube-dl or take it in the Mint sources with Synaptic.

To upgrade it:

sudo pip3 install --upgrade youtube_dl

Now we change the path doing a symbolic link:

sudo ln -s /usr/bin/python3 /usr/local/bin/python

Yet we can download vids, just open an terminal and paste:

youtube-dl my_video_link

Source


AMD Ryzen 7 3700X - Gigabyte B550 AORUS ELITE V2 - 4x8GB DDR4 - SSD 1,5TO - GTX1660TI 6GB - PSU Gigabyte 750W Gold - Zalman X3 White
Devuan / W11

Offline

#2 2022-08-29 10:01:28

alexkemp
Member
Registered: 2018-05-14
Posts: 290  

Re: [HowTo] Install latest youtube-dl on DEVUAN 4

I advise you most strongly not to bother.

This is the result of a youtube-dl (local) upgrade attempt just now:

sudo /usr/local/bin/youtube-dl -U
youtube-dl is up-to-date (2021.12.17)

It has been abandoned & no longer will download most YT videos. Use yt-dlp instead (available via backports):

man yt-dlp
NAME
       yt-dlp - A youtube-dl fork with additional features and patches
# …
$ yt-dlp --version
2022.08.19

Last edited by alexkemp (2022-08-29 10:03:00)

Offline

#3 2022-08-29 15:25:58

Tritonio
Member
Registered: 2022-01-09
Posts: 31  

Re: [HowTo] Install latest youtube-dl on DEVUAN 4

I used youtube-dl just fine yesterday. In general it needs me to keep a tab open with the video otherwise google eventually figures out I'm downloading it and cuts me off. Although this only affects downloading playlists, if it's a single video it never cuts in the middle.

alexkemp when I try the command you run to update youtube-dl I get:

youtube-dl: error: youtube-dl's self-update mechanism is disabled on Debian.

Did you get your version from elsewhere?

Offline

#4 2022-08-29 17:22:58

alexkemp
Member
Registered: 2018-05-14
Posts: 290  

Re: [HowTo] Install latest youtube-dl on DEVUAN 4

Tritonio wrote:

Did you get your version from elsewhere?

No. The standard youtube-dl is also installed in the standard location. However, I first got it in the days of Debian & updates were few & far in between (today updates are never). So, I installed a second copy in /usr/local/bin and, if you look at the code in my post, that is where the update command is made. I still have youtube-dl installed, but it never updates now:

$ /usr/bin/youtube-dl --version
2021.06.06
$ /usr/local/bin/youtube-dl --version
2021.12.17
$ /usr/bin/yt-dlp --version
2022.08.19

If you only ever want to download old YT videos then you do not need yt-dlp. However, if a recent video then you do, since G changes the algorithm every month or two. Hence the need to make use of backports.

Last edited by alexkemp (2022-08-29 17:26:06)

Offline

Board footer