6

I find it extremely hard to install software on a Linux machine as a regular user. I don't have root privileges on this machine, so I can't use any package manager system.

For example I'm trying to install a simple IRC client, but installing everything from source is a pain because I have to manually download and install every single dependency on the tree (irssi->glib->ncurses etc.. etc..).

So I downloaded ircii which seems to be the most minimalistic client I can find, it still requires some program called lex which I can't find.

Any easy solutions for this hassling task? Why don't people just deliver binaries that have all I need included in them (sort of like .exes)?

3
  • I know this is not the answer you are looking for, but why not to ask from the system administrators if they are willing to install the software you want to use? Aug 30, 2010 at 11:11
  • 1
    the owner is on vacation. i just need to install an irc app. this is achievable just fine without root privileges... so it's not a privileges issue... it's just not as easy... maybe there's a way to run packages managers as local users providing an installation path? dunno... i haven't used linux much. Aug 30, 2010 at 11:22
  • You can't find lex because the most common implementation is called flex (and predates the adobe product by roughly two decades). Aug 30, 2010 at 11:35

8 Answers 8

2

You might want to take a look at the Nix package manager. Not only is its whole approach to package management very interesting, but the website also claims that it works on every Linux distribution and allows non-privileged users to install software using it. You can find more information as well as a complete list of all available packages (ca. 2500) at http://nixos.org/nix/ .

2
  • 1
    They've hard coded in the /nix directory, so it can be in single user mode, but you still need sudo to do the initial install.
    – Diagon
    Oct 1, 2018 at 22:05
  • you can't install nix as non-priviledge user
    – Rainb
    Jun 26, 2020 at 8:50
2

You would think more people would remember multi-user systems and how it's often acceptable to run software from your home directory. Nevertheless, you should confirm it is okay with your host.

If the system does not have the dependencies to compile from source and your administrator will not install them, your best options are as follows:

  • Locate a package compiled for the machine and extract the binary. (This may still fail without the dependencies.)
  • Locate a statically compiled binary for your system. Package or otherwise.
  • Statically compile on a similar machine and copy over
0
Any easy solutions for this hassling task? Why don't people just deliver binaries that have all I need included in them (sort of like .exes)?

At the risk of sounding the snarky, the way to do this is to either

  1. get root privileges
  2. have your sysadmin at your beck and call

I'm assuming the machine you are working on isn't yours, otherwise #1 would be achievable. With that assumption said, if it's my machine that you are working on, I don't want you to be able to install new packages and libraries whenever you want and I want you to come to me to do this unless I really trust you. This is how linux distributions and linux administration is supposed to work.

So... why people just don't deliver binaries? It's most likely due to linux (libraries) being much more module in nature and slightly more fragmented. There isn't a huge core api like win32 that a developer can assure will be there. They have to rely on the explicit libraries they need and specific versions of those libraries to be available at both compile time and runtime in order to successfully distribute their software. This is almost universally true. AFAIK, Windows has the same problem with all but the simplest of exes which just rely on core Windows libraries - you'd have to run an installer with Admin privileges to make registry modifications and install libraries. MacOSX is about the only OS out of the most well known 3 to cover the use case you are talking about, since all .app files are completely self contained and can be installed in a user's $HOME and work just fine.

3
  • 2
    even linux binaries could be statically linked and distributed with all they need inside, just like .app Aug 30, 2010 at 11:19
  • 1
    @Luca: Yes, that's true. But .APPs only need to run on Macs -- a very tightly controlled platform. Maintainers probably wouldn't enjoy building their programs against every single architecture, lib version, gcc version, etc. Source is the "clean" way to distribute.
    – jscott
    Aug 30, 2010 at 12:46
  • If you statically compile a binary with a vulnerable or buggy library, updating the system library will not eliminate the binary without recompiling the software. The dynamic design is not a bad thing.
    – Warner
    Aug 30, 2010 at 17:06
0

It is the way it should be, only administrators should administrate machines, and users should only use it.

Anyway if you find a source package wich depends on software already installed you won't need to recompile it.

There are also binaries for linux, but not so many. I recomend you to try to find programs created for interpreted languages. You will find a lot more and the requisite will be a java, python or perl interpreter.

Check also if you have the ability to start wine, if you can, you could run a win32 executable, even install it.

3
  • the fact that only admins can install software is a stupid argument since there's nothing stopping you from installing all the software that you want... it's just not as easy as using a package manager... and only admins have access to it Aug 30, 2010 at 11:25
  • Only admins can install software. However any user can run software. Running make, auto-tools, gcc and all the tools to make an elf binary and running that binary its not installing software. You can download an exe to your desktop on that other OS and run from there, but that software isn't installed.
    – theist
    Aug 30, 2010 at 14:20
  • that reminded me wine, added to my answer.
    – theist
    Aug 30, 2010 at 14:28
0

You could set up the same version of your Linux in a virtual machine and try building a static version of your app. Then you just transfer it to your home directory on the server and it shall run (assuming you can execute programs from your home directory, this is not always possible, sometimes /home lives on a filesystem mounted with noexec option for security reasons).

0

It occurs to me that you probably have emacs installed, which means that you have a hosted "OS" with it's own package manager that you can use from user space.

Package supports erc, and I am sure there are other emacs IRC clients.

'Course, if you're not an emacs guy, this won't be what you want to hear.

0

Linuxbrew may help. I'm installing that. I have to install gcc before, because in my situation I'm on a very old machine and gcc is very old too. I managed to install brew, but to install other packages didn't work yet (currently I'm at 'making' gcc).

I tried to install nix, but it has too many prerequisites, including pkg-config, Perl DBI, DBD::SQLite, xmllint and xsltproc, the Boehm garbage collector, etc. If your task is to install manually less, this seems to be a bad choice.

In two words: if your package can be installed via autotools (./configure && make && make install) or through other civilised means, you're lucky, otherwise to install a package manager may be much more difficult than to install the package itself.

-1

What about asking the system administrator to give you a sudo account? If properly configured can allow you only to execute some commands as a root user, such as the package manager, so you can install software without root credentials.

1
  • sudo is essentially root. allowing the installation of a specific package without allowing the user to do anything else as root would be non trivial.
    – Aaron
    Jun 5, 2017 at 21:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .