this post was submitted on 28 Oct 2023
15 points (100.0% liked)

Arch Linux

7750 readers
2 users here now

The beloved lightweight distro

founded 4 years ago
MODERATORS
 

Linux noob still learning the basics with a simple question. Got Plex and *arr suite up and running great but Jellyfin Server refuses to install. Looks like a broken link. How do I use an alternate repo or other install source? Screenshot is the end of the output from running yay -S jellyfin-server and yes I'm on my phone because I'm too high to get up right now.

you are viewing a single comment's thread
view the rest of the comments
[–] NicKoehler@feddit.it 5 points 1 year ago* (last edited 1 year ago) (1 children)

Do this:

sudo pacman -Sy

And then try again.

Alternatively you can do this directly:

yay -Sy jellyfin-server
[–] Fuck_u_spez_@sh.itjust.works 2 points 1 year ago (3 children)

Hot damn, that worked. What's the y?

[–] gratux@lemmy.blahaj.zone 17 points 1 year ago (1 children)

The y is dangerous to be used without u. Do not follow the advice above unless you know what you are doing. Instead, do pacman -Syu jellyfin-server

The y option tells pacman to update its package database. In your case, your local database got out of sync with the database from the mirrors. This normal, newer versions of software are released all the time. Pacman then tried to get the latest locally known version of jellyfin from the mirrors, but they no longer have it, as a newer one replaced it.

By updating the database, pacman becomes aware of the newer version and can request it from the mirror. But there is now a subtle problem: the new package and some installed package could require incompatible versions of some dependency. When pacman decides to update the dependecy package, the other package is broken. This is called a "partial upgrade", which can seriously break your system if you are not careful.

The u option upgrades all installed packages to the latest version, so the packages and their dependencies don't get out of sync with each other.

See Arch Wiki, System_maintenance for more explanation.

[–] Fuck_u_spez_@sh.itjust.works 6 points 1 year ago (1 children)

Thanks for the info... and for reminding me to run a backup.

[–] taaz@biglemmowski.win 1 points 1 year ago

And alternatively you can run just yay , choose the matching one and yay should do the right thing.

[–] Ooops@kbin.social 5 points 1 year ago* (last edited 1 year ago)

You didn't upgrade before installing. -y updates the package list to match the mirror, -u updates your system (and you should not use them separately, so if in doubt always use -yu).

So when you try to install (without synchronising the package list first) your system looks at it's outdated package list, then requests files that are no longer on the mirror as they are already on a higher version.

[–] Nibodhika@lemmy.world 2 points 1 year ago (1 children)

Pacman keeps a local cache of the packages that exist, so it knows that whatever you were trying to install has a version X and that depends on library Y on version Z. Except when it tried to download the library Y on version Z the package didn't existed anymore, most likely because a new version W was released since you generated your cache. The y option updates the local database first, so it knows the proper up to date versions of things.

That being said running -Sy is a bad idea, because for example what you're trying to install might update a library that the system expects to be an old version and then everything breaks. If this ever happens again the correct way to fix it is to first do a system update -Syu and afterwards install the new package.

[–] Ooops@kbin.social 1 points 1 year ago

the correct way to fix it is to first do a system update -Syu and afterwards install the new package

Or you just do it as one step in general: pacman -Syu