39
submitted 4 months ago by merompetehla@lemmy.ml to c/linux@lemmy.ml

All I wanted is to install the current yt-dlp (2024.07.16-1) on debian 12.6.

Suggested way to that according to https://packages.debian.org/sid/all/yt-dlp/download is to add that line to that file (etc/apt/sources.list), but do I really need to download the 1600 files that upgrade would entail?

I don't want to download the tar.gz 'cause upgrading that would be a pain.

all 26 comments
sorted by: hot top controversial new old
[-] dragonfly4933@lemmy.dbzer0.com 19 points 4 months ago

I would advise just creating ~/.bin or ~/.local/share/bin and dropping it in there. As long as you have permission to that directory, yt-dlp should be able to easily update itself.

[-] adarza@lemmy.ca 6 points 4 months ago* (last edited 4 months ago)

this is the way. easy. no install. no extra steps. update when you want.

or you can add the ppa that's listed in the yt-dlp install instructions (scroll down to third-party package managers > apt) and use apt to install it like any other package.

[-] taaz@biglemmowski.win 19 points 4 months ago

pipx install yt-dlp

This will install yt-dlp with everything it needs but without fucking anything else up, both system-wise and for your user (because installing python packages in your home manually can cause problems). You must have your $HOME/.local/bin in $PATH to then be able to run yt-dlp, but I think pipx will check and warn you.

pipx upgrade yt-dlp to update it (or upgrade-all)

[-] balder1993@programming.dev 4 points 4 months ago* (last edited 4 months ago)

That’s what I do, except I straight up create the python venv in a folder, activate it and then do pip install yt-dlp. No messing up with my system.

[-] eager_eagle@lemmy.world 6 points 4 months ago* (last edited 4 months ago)

pipx does that without this manual process - it's meant for these standalone apps that are in your $PATH.

[-] balder1993@programming.dev 5 points 4 months ago* (last edited 4 months ago)

It’s a good concept, I just have to look it up and understand exactly what it is doing before I start using it.

[-] BaalInvoker@lemmy.eco.br 11 points 4 months ago

In best scenario you'll turn your Debian to SID. Worst case scenario you'll break your system.

I do not suggest this operation unless you're sure what you're doing.

Alternatively you can install yt-dlp using snap or using Nix Package manager

[-] savvywolf@pawb.social 11 points 4 months ago

Debian sid is their unstable branch; it contains all new packages before they are tested. As such, if you try to install updates from it, you'll likely get a very unstable system.

You can set it up so that you only get a specific package ( https://wiki.debian.org/DebianUnstable#Can_I_use_Sid_packages_on_.22testing.22.3F ), but honestly, if you need the very latest version, I'd recommend just grabbing it from github or wherever. Iirc, yt-dlp has a -U flag which will automatically update it.

[-] rotopenguin@infosec.pub 11 points 4 months ago* (last edited 4 months ago)

The latest yt-dlp is in bookworm-backports.

https://wiki.debian.org/Backports

[-] ryannathans@aussie.zone 10 points 4 months ago

Wanting latest packages on debian

[-] bjoern_tantau@swg-empire.de 9 points 4 months ago

You're adding the full repository of Debian unstable to your system. This wouldn't just enable you to install yt-dlp but it would also turn your whole system from Debian stable to Debian unstable on the next update. Total overkill for one package.

[-] SteveTech@programming.dev 8 points 4 months ago

If you want the latest version of most python apps, I'd recommend using pipx, since it'll create python virtual environments for each app installed, and won't mess with system packages.

[-] cmnybo@discuss.tchncs.de 7 points 4 months ago

It's best to install yt-dlp manually and let it self update. It needs to be kept on the latest version since youtube is constantly breaking things. It's only a single file and it can be installed in any directory in your $PATH.

[-] havocpants@lemm.ee 2 points 4 months ago

This is the way.

[-] eshep@social.trom.tf 6 points 4 months ago

@merompetehla If you're not running sid, do not look for install instructions on the sid page. If you're on 12.6, that's Bookworm (current stable name), look there for help with 12 stuff.

Best way to use the current #yt-dlp is to uninstall the one from the repo, and grab the current release from the github page and drop it in $PATH somewhere.

[-] bloodfart@lemmy.ml 3 points 4 months ago* (last edited 4 months ago)

What you are doing: adding the unstable repository to your Debian system. Debian has three levels of software stability, stable, testing and unstable.

Stable does what is says on the tin. It’s stable, but older. Testing is gonna be the next major version when it’s deemed stable enough to be called stable. Unstable is for trying out new shit and seeing what breaks. It has the most recent packages and the most problems.

Stable and testing will be named after different characters from Toy Story, unstable will always be named after the character “Sid” from Toy Story.

In the context of what you’re trying to do, you are fucking up.

Yt-dlp can (and should in most cases) update itself by using the command “yt-dlp -U”. But it will only update itself that way if you manually install it from the git page.

You can do this by downloading it and putting it somewhere in your users $path. This is just like putting a program folder in windows in c:\program files and making a start menu entry manually, except you won’t make the start menu entry because your shell will always look in $path to see if it can run what you just typed. If you’re familiar with Macs, it’s literally like copying the program to your applications directory.

There’s instructions how to manually install on the yt-dlp git.

You should do yt-dlp this way unless you have a good reason to use the Debian repos or pip.

E: once you get yourself straightened out, make sure to add “yt-dlp -U” to all your scripts before they actually run. It keeps you from getting the wrong quality profile or downloads from failing or whatever.

[-] kbal@fedia.io 2 points 4 months ago* (last edited 4 months ago)

https://github.com/yt-dlp/yt-dlp/wiki/Installation

Normally I try to use apt for everything, but yt-dlp is an exception since when you want it, you probably do actually want the latest version. I think the only thing it depends on is python, so simple enough to get it from git one way or another.

PS: Now that I actually look at that page I linked to, I see there's a PPA repo you could use. I don't know who runs it or how up-to-date it is, but it's probably a better bet than what you were trying.

[-] Bitrot@lemmy.sdf.org 5 points 4 months ago

PPA shouldn’t be used on Debian.

[-] therealjcdenton@lemmy.zip 1 points 4 months ago

Just use pip

[-] CyberSyndicalist@hexbear.net 1 points 4 months ago

If you want something easier to manage you can use Parabolic which is a graphical interface for yt-dlp that you can install as a flatpak.

[-] GustavoM@lemmy.world 1 points 4 months ago* (last edited 4 months ago)

Just install it via pip and then symlink its binary file to /usr/bin.

t. Am running a live stream 24/7 on my orange pi zero 3 (via ffplay/yt-dlp) since forever.

"Why not simply add $HOME/.local/bin to $PATH?"

Because it breaks things. While symlinking it does not.

"Why?"

No idea, honestly.

Also, you can take a step further and make a tmpfs partition @ $HOME/.local and then add the following line to your .bash_profile file: TMPDIR=$HOME/.local pip install --break-system-packages -I --no-input yt-dlp &&.

[-] eager_eagle@lemmy.world 2 points 4 months ago

use pipx install or your distro's package instead of pip install --break-system-packages

[-] GustavoM@lemmy.world 1 points 4 months ago

Apparently pipx dislikes tmpfs partitions, so nah.

[-] eager_eagle@lemmy.world 1 points 4 months ago

why would you want to nuke your installed cli apps on every boot with a tmpfs

[-] GustavoM@lemmy.world 1 points 4 months ago

Eh, it's a tradeoff that I get in exchange of a longer microsd lifespan. Which I'm completely fine with.

this post was submitted on 23 Jul 2024
39 points (97.6% liked)

Linux

48349 readers
422 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS