[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Packages don't get installed in the correct path

From: Tobias Geerinckx-Rice
Subject: Re: Packages don't get installed in the correct path
Date: Wed, 17 Mar 2021 07:51:18 +0100

Hi Garjola!

Garjola Dindi 写道:
I have added the following to my ~/.basrhc as indicated in the manual:

,----[ bash ]
| export PATH="/home/garjola/.config/guix/current/bin${PATH:+:}$PATH"

Which mad-Max manual indicates this?  Not [my copy of] Guix's:

 “(1) Users sometimes wrongfully augment environment variables
 such as 'PATH' in their '~/.bashrc' file.  As a consequence,
 when 'guix environment' launches it, Bash may read '~/.bashrc',
 thereby introducing "impurities" in these environment variables.
 It is an error to define such environment variables in
 '.bashrc'; instead, they should be defined in '.bash_profile',
 which is sourced only by log-in shells.
 *Note (bash)Bash Startup Files::, for details on Bash start-up

        -- info "(guix)Invoking guix environment"

Adding PATH to .bashrc is almost always a mistake, and round that up to ‘always’. As a Guix System user I'm less familiar with GUIX_LOCPATH, but the manual doesn't suggest adding it either.

Actually, despite the configuration in .bashrc

Side note: sourcing <profile>/etc/profile configures your environment to ‘see’ Guix-installed software. It does not configure Guix, which will install to ~/.guix-profile unless you specify another one with --profile= (-p).

the packages do not get installed in the $HOME tree, but in


 ~ λ ls -l ~/.guix-profile
 lrwxrwxrwx 1 nckx nckx 45 Sep 28 09:01 /home/nckx/.guix-profile
        -> /var/guix/profiles/per-user/nckx/guix-profile/

Unless something has gone *very* wrong, your installed packages should show up under both /var/... and ~/.guix-profile alike.

The $HOME tree only contains the guix binaries:

,----[ bash ]
| $ ls ${HOME}/.config/guix/current/bin
| guix  guix-daemon

This is good: ~/.config/guix/current is not ~/.guix-profile.

The latter is your default profile, where ‘guix install’ and friends install software. The former is exclusively for use by ‘guix pull’ and provides the ‘guix’ command itself, to avoid a chicken-and-egg problem.

The most annoying thing is that the programs are not in the path

I don't want to presume what you mean: that they're not where you thought they would be (not in ~/.config/guix), or that you can't actually run them (not in PATH)?

There's nothing wrong with any of the directories you mentioned. If you can run Guix-installed software from the shell immediately after installing it, I'd say that the /var thing is just a quirk of running Guix on a foreign distribution.

Quite a few regulars do so, some on Debian. I'll let them correct me if I'm wrong (and explain the mystery that is GUIX_LOCPATH).

Kind regards,


Attachment: signature.asc
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]