this post was submitted on 05 Apr 2024
23 points (82.9% liked)

Linux

48229 readers
962 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
 

Usually, I prefer manually installing the packages needed for getting started with a new language or technlogy.

I avoid using distro package managers since they tend to be a bit outdated in this regard, and specialised package managers like SDKMAN! seem overkill for one or more packages. Exceptions being languages with excellent tooling and version management like Rust or Ocaml.

I've been doing this for a while and was wondering what the general consensus is

Edit: Thanks for your replies everyone! I've decided to stick with my distro package manager.

all 27 comments
sorted by: hot top controversial new old
[–] [email protected] 27 points 7 months ago (2 children)

Definitely stick to the OS package manager. Not doing this is a mistake a lot of devs make.

Otherwise you end up with an app that doesn't run on most systems, and expecting people to do curl piped to bash as root.

Stick to the stable branch. Stick to the OS repos.

[–] [email protected] 3 points 7 months ago

Thanks for the advice :)

[–] [email protected] 1 points 7 months ago

Stick to the stable branch

Arch testing you say? No problem!

[–] [email protected] 14 points 7 months ago (1 children)

uninstalling sometimes doesn't work when you install from source, so i've learned to be patient and always use the distro package.

[–] [email protected] 8 points 7 months ago

This is why you should build a package when compiling from source instead of doing make install directly. Packages can easily unistalled or upgraded.

[–] [email protected] 11 points 7 months ago (1 children)

For personal use, I previously used system packages, but now I'm installing them through nix home-manager. It's really nice, especially because I've got a list of them now and don't have remember what to install ever again.

[–] [email protected] 4 points 7 months ago (1 children)

I'm also curious about getting Nix on non NixOS, are there any simple example home manager configurations to look at so that I can easily start?

[–] [email protected] 2 points 7 months ago (1 children)
[–] [email protected] 2 points 7 months ago* (last edited 7 months ago) (1 children)

Nice, thanks!
I guess it's a kind of "Easy start" and "Nix", name a more iconic duo situation XD

[–] [email protected] 3 points 7 months ago (1 children)

It's actually pretty easy if you start with those files, getting to them was a hellish process that took multiple failed attempts though. I'm actually planning on writing a short guide, but didn't find the time yet.

[–] [email protected] 2 points 7 months ago

I'll try asap!

Good luck on your guide, I think it can be handy

[–] [email protected] 9 points 7 months ago (1 children)

I use Nix, even on my Ubuntu machines, to install tooling in my user profile.

Nixpkgs unstable stays pretty up to date. The few I want something on release day or bleeding edge nightlies, I override the derivation source. I use nvfetcher to pull the latest release or head of the default branch as part of my update routine.

I'm pretty new to Nix, so its been slow integrating into my workflow, but I plan to start integrating flake's into my repos. My team seems to have constant issues with keeping their tooling up to date which breaks things locally from time to time.

[–] [email protected] 1 points 7 months ago

one more for using nix, but for language tooling I generally prefer a nix shell and installing per project dependencies there. then updates don't break random projects and you know all the dependencies of a given project

[–] [email protected] 8 points 7 months ago

nixos, I use devshells with flakes (and direnv)

[–] [email protected] 5 points 7 months ago

Depends what I am working on.

Sometimes I have to work with a mess of angular and node versions, which I don’t want polluting my main system and be something to need to manage. So I use containers for development and have all dependencies for that specific project in the container

[–] [email protected] 4 points 7 months ago

I use stuff like Rustup, in a Distrobox dedicated to the work area.

[–] [email protected] 4 points 7 months ago

+1 to running whatever is packaged by your distro. For me, Fedora is rarely out of date. If worse comes to worse, you can always volunteer to become a packager and improve the ecosystem for everyone while fixing your own problems.

[–] [email protected] 3 points 7 months ago

Usually distro packages, even mingw and android's sdk are packaged now (at least on Ubuntu which i'm forced to use).

Not shying away from upstream though.

[–] [email protected] 3 points 7 months ago* (last edited 7 months ago) (1 children)

I usually use a version manager to install those stuff so I can install multiple versions when I need it. asdf is my first choice because it support a lot of languages via its plugin system, and the list of plugins is huge.

[–] [email protected] 1 points 7 months ago

I just checked it out, it seems really cool

[–] [email protected] 2 points 7 months ago

I use Arch BTW, so no problem with outdated packages. ;)

[–] [email protected] 2 points 7 months ago

I'm a big fan of Condaforge for this sort of thing. Keeps my development software separate from my daily driving software.

[–] [email protected] 2 points 7 months ago

I run Ubuntu and use the Nala frontend for APT to keep a log of my package installs. That way, I can easily remove everything if I no longer need to work with a particular language or set of dependencies. For anything too complicated, I like to drop into a Docker container (which integrates nice with VSCode/Codium)

[–] [email protected] 1 points 7 months ago

Don't do that. I would use distrobox with a Fedora container

[–] [email protected] 1 points 7 months ago* (last edited 7 months ago)

Since I run Fedora, the repos are very up to date. Not as bleeding edge as Arch may be, but plenty fine for learning and development. There are a lot of issues you can run into during manual installation/uninstallation, so I always use distro package managers. Plus, that ensures that software has a much greater chance of running in an environment similar to an end user, so it's just ideal overall. I can certainly understand frustrations with Debian packages being out of date, but that's an ideological choice, and the user should have been aware of that before choosing Debian. All I usually have to do is install the compiler/runtime, a language server for neovim, and some minor configuration for IntelliSense, then I can be up and running with a new language.

The other side to this is that you don't necessarily need to be using the latest version of the language to learn or develop in it. It's often a good idea to stick with the latest LTS release of the language so that it's most available and compatible with the runtime/environment that the end user has access to. Utilizing features only available on bleeding edge versions of the language can make it difficult for others to use your software, as they'd have to go through the hassle of manually installing the latest version, and can lead to breakage if the language changes before the next stable version is released.

[–] [email protected] 0 points 7 months ago

The only "compiler" I need is npm... Usually just use the one from the repos, however if it's too old, which on most stable distros it usually is, I install a tool, called n from the old version of npm and use that to update npm...