Hacker News new | comments | ask | show | jobs | submit login

I wonder why Linux users would want to use Homebrew? Are the packages not available via the normal Linux package managers?



For many distributions (redhat, ubuntu lts, debian) packages can grow rather old. If you want something more up-to-date, linuxbrew can help. I suppose that's less useful on rolling distros like gentoo or arch.


I ran into this the other day with ubuntu (on a windows laptop with the linux subsystem) opting for node version 8 instead of 10.

One of those annoying things that is valid from a "lets keep things backwards compatible" point of view that ends you up with the wrong versions of everything you care about as a developer. I fixed it by uninstalling node and then installing nvm and then doing a nvm install 10. Of course having per tool custom hacks around "your distribution comes with the wrong version of everything you care about, 100% guaranteed" gets old pretty quickly. Brew fixes this on Mac.

On most servers on the other hand, you should not be installing developer tools or runtimes at all and use something like docker instead. Installing stuff like node.js, python, ruby, etc. via the default package manager is almost always the wrong thing to do on both development machines and production machines.

Speaking of docker, having something like brew on a lightweight image could be a pretty awesome way of installing what you need without relying on downloading tar balls and other madness that you find in a typical Dockerfile. Why reinvent that wheel?

I haven't come across linux brew. Sounds like a good idea. Merging the two ecosystems sounds like a better one. Having that on windows as well; awesome. Simplifies a lot of stuff developers have to do on different platforms to end up with the same tools.


I think that's a good example of how the whole paradigm of package management as an application distribution mechanism (at least as implemented) is really terrible. What good is all this management if I have to bypass it and everything it supposedly provides just to get up to date software, or two versions of the same software?


I totally agree with you. I think it's pretty pointless to have terabytes of repos for software that then grows stale.

But distributions often say that it's the only way to keep the whole "ecosystem" of a distribution stable.

So? What I think is that Linux "distributions" are growing less and less useful nowadays. On the desktop, no Linux was able to gain significant traction, and many developers are just using Macs and Windows with WSL.

On the server side, ways to "build your own distro" for creating a tuned stack for your purposes ( read: docker images ) exist and seem more useful than standard distro components. Nixos is another take.

Yes, "just apt install foo" is nice, until it isn't. I think we're at a tipping point between the old and new approach.


> But distributions often say that it's the only way to keep the whole "ecosystem" of a distribution stable.

In practice, it doesn't work. I did a Debian Stretch `apt-get upgrade` and it pulled in a new version of firefox-esr that did not run on my Rockchip Chromebook. Debian was forced to do it because it was end-of-life for the older firefox-esr, and Debian's security backports policy doesn't scale for projects like Chromium and Firefox.


Consider someone writing a guide on how to install packages on multiple platforms. You only need one guide and not three based on brew. Especially interesting for Windows 10 IMO.


Generally speaking all that documentation should consist of is "click this link to download <thing> for <os>" and maybe "extract its contents somewhere". Anything else is over-complicating the situation for no good reason. Unfortunately that has become such an ingrained part of the open source culture that we keep imagining things like this are a good idea.


For many packages it is difficult to get packaged for all Linux distributions. Hence if your package does not get packaged for a particular Linux distribution users can still install your package using homebrew.


Package managers can only offer what they are feeded with. And that does not include all software in all incarnations. A usual problem is that certain distributions are lacking newer versions. Or the ability to install multiple versions parallel. Something like homebrew is a solution for this.


Homebrew on Linux (known as Linuxbrew) does not require root access.

Of course, Nix also works without root and has many other benefits ;).


However, Nix requires you to create a /nix directory, which is not possible in some cases.


It doesn't require it:

- You can create the nix store in some directory you own. But this entails recompiling every package, because the precompiled binaries have dependencies on the store being in /nix.

- If user namespaces are enabled, you can bind mount /nix to some directory that you own:

https://nixos.wiki/wiki/Nix_Installation_Guide

Of course, it is more convenient if you can convince a sysadmin to install multi-user Nix. From there on, every user can install their own packages (in a non-conflicting manner).


I don't think recompilation is required. You can use proot (like chroot) to make a local dir look like "/nix" to subprocesses. I've seen it here (but not tested it): https://gist.github.com/mbbx6spp/4f467adb4e0133063fd87e264c6...


Yes, that's a similar approach to the use of user namespaces that I mentioned, which also doesn't require recompilation. I guess proot also works on systems with user namespaces disabled (which is sometimes done for security reasons).


That’s good to know, thanks for sharing!


I think this is a testament of Homebrew its success. Build a package manager for a OS that doesn't natively has one (macOS) and eventually expand to OS's that do have one (linux), because users request it / like Homebrew.


There are many small utilities that's not available especially if you stick to LTS. (Even ripgrep isn't available on 18.04. I feel this more when these 'remake better alternatives with rust/go' movement started to occur.)

And all you can do is hopefully find a trustworthy PPA that gets timely updates or you end up downloading it yourself and get them updated manaually.

I wanted to use Linuxbrew but this seems still not too mature.


Homebrew can be used as a package manager for C/C++ projects development and meanwhile doesn't mess up the system.


Chrome OS. Gentoo-based, but no package management available.


But not Linuxbrew, Chromebrew[1]!

1: https://skycocker.github.io/chromebrew/


Some people don't have root access.




Applications are open for YC Summer 2019

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: