5 ms·
Is there an equivalent for C/C++ programs? There's pip for python, npm for JS, cargo for rust For C/C++ all I know are multiple different possible build and m
by Aardwolf 4y ago
Is there an equivalent for C/C++ programs?
There's pip for python, npm for JS, cargo for rust
For C/C++ all I know are multiple different possible build and make systems, but none works like a package manager, as far as I know
Note that I don't always love when something installed with pip or npm puts files all over your OS or homedir without being managed by the package manager, though
- ploxiln 4y ago./configure --prefix=/usr/local && make && sudo make install (I consider it a feature that this doesn't automatically download and install hundreds to thousands of things I haven't even heard of)
- mprovost 4y agoI mean, ignoring the fact that the configure script is often a larger program than the one you're trying to install, it (and make) can do anything to your system and unless you read the contents of each you're just taking it on faith that it isn't downloading and installing hundreds of things.
- ploxiln 4y ago... but if I'm installing curl or jq or similar, I'm quite familiar with the provenance of the project, and of the tarball I'm running a configure script from. And maybe I need to install one or two dependencies, similarly they should be familiar, or small and comprehensible, and only downloaded and installed with my explicit actions. (And yeah autoconf generated configure scripts are crazy huge and baroque, and could easily be 1/10 the size for the needed functionality, but compared to "npm install" I'll take it.)
- masklinn 4y ago> Is there an equivalent for C/C++ programs? [...] For C/C++ all I know are multiple different possible build and make systems, but none works like a package manager, as far as I know Downloading the source by hand, trying to wrangle what dependencies it has not vendored (which may or may not be available through your system package managers, in versions which may or may not be recent enough), and trying to find out how to build it. Though do note that this issue can also hit when installing python, js, or rust package, if they ultimately have native dependencies. Their respective build systems will generally try to make it work out of the box, but if your configuration was not specifically tested / supported it can break with fun C-level compilation errors.
- nickstinemates 4y agoThe main solution to all of this complexity is another complex (but awesomely powerful) package manager called Portage. It's mainly used in Gentoo Linux It's awesome. And complicated.
- masklinn 4y agoThat, or Nix, maybe. Also awesome. Also complicated.
- deleted 4y ago[deleted]
- speed_spread 4y agoStop! I'm starting to miss Funtoo... And I now have all these Ryzen cores idling, longing for a world update... Must... Resist...
- db65edfc7996 4y agoPerhaps not everything you want, but in Python land there is pipx [0]. Pipx will create a virtual environment per binary program so that they are all isolated from each other and put things in a consistent location (~/.local/pipx). Then it is easy enough to do `pipx install black`, `pipx install cookiecutter`, whatever. Also has nice upgrade option in `pipx upgrade-all` [0] https://pypa.github.io/pipx/ https://pypa.github.io/pipx/
- nickstinemates 4y agoYes, it's called portage and comes with Gentoo. :)
- renewiltord 4y agoPerhaps the closest I've discovered is AUR in Arch.