* Packages don't get installed in the correct path
@ 2021-03-16 20:31 Garjola Dindi
2021-03-17 6:51 ` Tobias Geerinckx-Rice
0 siblings, 1 reply; 6+ messages in thread
From: Garjola Dindi @ 2021-03-16 20:31 UTC (permalink / raw)
To: help-guix
Hi,
I have installed the Guix package manager on Debian stable using the
instructions in the manual:
,----[ elisp ]
| (info "guix#Binary Installation")
`----
I have added the following to my ~/.basrhc as indicated in the manual:
,----[ bash ]
| export PATH="/home/garjola/.config/guix/current/bin${PATH:+:}$PATH"
| export GUIX_PROFILE="$HOME/.guix-profile"
| export GUIX_LOCPATH=$HOME/.guix-profile/lib/locale
| source "$HOME/.guix-profile/etc/profile"
`----
When I install a package, I get the following message:
,----
| hint: Consider setting the necessary environment variables by running:
|
| GUIX_PROFILE="/var/guix/profiles/per-user/garjola/guix-profile"
| . "$GUIX_PROFILE/etc/profile"
|
| Alternately, see `guix package --search-paths -p
| "/var/guix/profiles/per-user/garjola/guix-profile"'.
`----
Note that the message makes reference to /var/..../per-user/ instead of
~/.config/guix/current. Is that correct?
Actually, despite the configuration in .bashrc, the packages do not get
installed in the $HOME tree, but in /var/..../per-user/. The $HOME tree
only contains the guix binaries:
,----[ bash ]
| $ ls ${HOME}/.config/guix/current/bin
| guix guix-daemon
`----
The most annoying thing is that the programs are not in the path, but
what puzzles me is that I don't understand this behaviour.
I can of course change the environment vars in .bashrc to point to /var,
but this is not what the manual says.
Can anybody help me figure things out?
Thanks in advance.
Garjola
--
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Packages don't get installed in the correct path
2021-03-16 20:31 Packages don't get installed in the correct path Garjola Dindi
@ 2021-03-17 6:51 ` Tobias Geerinckx-Rice
2021-03-17 7:31 ` Garjola Dindi
0 siblings, 1 reply; 6+ messages in thread
From: Tobias Geerinckx-Rice @ 2021-03-17 6:51 UTC (permalink / raw)
To: Garjola Dindi; +Cc: help-guix
[-- Attachment #1: Type: text/plain, Size: 2807 bytes --]
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
files.”
-- 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
> /var/..../per-user/.
Lo:
~ λ 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,
T G-R
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Packages don't get installed in the correct path
2021-03-17 6:51 ` Tobias Geerinckx-Rice
@ 2021-03-17 7:31 ` Garjola Dindi
2021-03-17 7:49 ` Ricardo Wurmus
0 siblings, 1 reply; 6+ messages in thread
From: Garjola Dindi @ 2021-03-17 7:31 UTC (permalink / raw)
To: help-guix
On Wed 17-Mar-2021 at 07:51:18 +01, Tobias Geerinckx-Rice <me@tobias.gr>
wrote:
> 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:
>
[...]
Mine (installed in
/gnu/store/mi10gphgjw1d....5b-guix-82a9538ea/share/info/guix.info.gz)
says in section 5.5 Invoking ‘guix gc’:
,----
| The result of running ‘guix pull’ is a “profile” available under
| ‘~/.config/guix/current’ containing the latest Guix. Thus, make sure to
| add it to the beginning of your search path so that you use the latest
| version, and similarly for the Info manual (*note Documentation::):
|
| export PATH="$HOME/.config/guix/current/bin:$PATH"
`----
[...]
>
>> 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)?
They are not in PATH.
It seems that there are a lot of things that I have not understood about
how the whole thing works.
I will study the manual again. Is there a way to complete remove my
current installation so that I start with a clean slate?
Thank for your time.
Garjola
--
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Packages don't get installed in the correct path
2021-03-17 7:31 ` Garjola Dindi
@ 2021-03-17 7:49 ` Ricardo Wurmus
2021-03-17 9:25 ` Garjola Dindi
0 siblings, 1 reply; 6+ messages in thread
From: Ricardo Wurmus @ 2021-03-17 7:49 UTC (permalink / raw)
To: Garjola Dindi; +Cc: help-guix
Garjola Dindi <garjola@garjola.net> writes:
> On Wed 17-Mar-2021 at 07:51:18 +01, Tobias Geerinckx-Rice <me@tobias.gr>
> wrote:
>> 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:
>>
>
> [...]
>
>
> Mine (installed in
> /gnu/store/mi10gphgjw1d....5b-guix-82a9538ea/share/info/guix.info.gz)
> says in section 5.5 Invoking ‘guix gc’:
>
> ,----
> | The result of running ‘guix pull’ is a “profile” available under
> | ‘~/.config/guix/current’ containing the latest Guix. Thus, make sure to
> | add it to the beginning of your search path so that you use the latest
> | version, and similarly for the Info manual (*note Documentation::):
> |
> | export PATH="$HOME/.config/guix/current/bin:$PATH"
> `----
That’s okay. This ensures that “guix” (provided by “guix pull”) is
available and preferred over whatever global installation of Guix there
might be (such as /usr/local/bin/guix).
>>> 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)?
>
> They are not in PATH.
Then all you need is to add this to ~/.bash_profile
GUIX_PROFILE=$HOME/.guix-profile
source $GUIX_PROFILE/etc/profile
> It seems that there are a lot of things that I have not understood about
> how the whole thing works.
>
> I will study the manual again. Is there a way to complete remove my
> current installation so that I start with a clean slate?
I advise against it. Your problem is with variables, not with stateless
binaries in /gnu/store.
--
Ricardo
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Packages don't get installed in the correct path
2021-03-17 7:49 ` Ricardo Wurmus
@ 2021-03-17 9:25 ` Garjola Dindi
2021-03-17 13:22 ` Garjola Dindi
0 siblings, 1 reply; 6+ messages in thread
From: Garjola Dindi @ 2021-03-17 9:25 UTC (permalink / raw)
To: help-guix
On Wed 17-Mar-2021 at 08:49:22 +01, Ricardo Wurmus <rekado@elephly.net>
wrote:
> Garjola Dindi <garjola@garjola.net> writes:
>
>> On Wed 17-Mar-2021 at 07:51:18 +01, Tobias Geerinckx-Rice <me@tobias.gr>
>> wrote:
>>> 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:
>>>
>>
>> [...]
>>
>>
>> Mine (installed in
>> /gnu/store/mi10gphgjw1d....5b-guix-82a9538ea/share/info/guix.info.gz)
>> says in section 5.5 Invoking ‘guix gc’:
>>
>> ,----
>> | The result of running ‘guix pull’ is a “profile” available under
>> | ‘~/.config/guix/current’ containing the latest Guix. Thus, make sure to
>> | add it to the beginning of your search path so that you use the latest
>> | version, and similarly for the Info manual (*note Documentation::):
>> |
>> | export PATH="$HOME/.config/guix/current/bin:$PATH"
>> `----
>
> That’s okay. This ensures that “guix” (provided by “guix pull”) is
> available and preferred over whatever global installation of Guix there
> might be (such as /usr/local/bin/guix).
So this is in contradiction with what Tobias wrote before?
>
>>>> 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)?
>>
>> They are not in PATH.
>
> Then all you need is to add this to ~/.bash_profile
>
> GUIX_PROFILE=$HOME/.guix-profile
> source $GUIX_PROFILE/etc/profile
The issue is that $HOME/.guix-profile/etc/profile is empty, and
therefore, none of the installed packages in /var are in the path.
>
>> It seems that there are a lot of things that I have not understood about
>> how the whole thing works.
>>
>> I will study the manual again. Is there a way to complete remove my
>> current installation so that I start with a clean slate?
>
> I advise against it. Your problem is with variables, not with stateless
> binaries in /gnu/store.
Given the inconsistencies I have, (the profile file being empty, for
instance), I don't feel confident with my installation and would rather
start from scratch. Is this possible?
Thanks.
--
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Packages don't get installed in the correct path
2021-03-17 9:25 ` Garjola Dindi
@ 2021-03-17 13:22 ` Garjola Dindi
0 siblings, 0 replies; 6+ messages in thread
From: Garjola Dindi @ 2021-03-17 13:22 UTC (permalink / raw)
To: help-guix
On Wed 17-Mar-2021 at 10:25:39 +01, Garjola Dindi <garjola@garjola.net>
wrote:
> On Wed 17-Mar-2021 at 08:49:22 +01, Ricardo Wurmus <rekado@elephly.net>
> wrote:
>> Garjola Dindi <garjola@garjola.net> writes:
>>
>>> On Wed 17-Mar-2021 at 07:51:18 +01, Tobias Geerinckx-Rice <me@tobias.gr>
>>> wrote:
>>> They are not in PATH.
>>
>> Then all you need is to add this to ~/.bash_profile
>>
>> GUIX_PROFILE=$HOME/.guix-profile
>> source $GUIX_PROFILE/etc/profile
>
> The issue is that $HOME/.guix-profile/etc/profile is empty, and
> therefore, none of the installed packages in /var are in the path.
>>
>>> It seems that there are a lot of things that I have not understood about
>>> how the whole thing works.
>>>
>>> I will study the manual again. Is there a way to complete remove my
>>> current installation so that I start with a clean slate?
>>
>> I advise against it. Your problem is with variables, not with stateless
>> binaries in /gnu/store.
>
> Given the inconsistencies I have, (the profile file being empty, for
> instance), I don't feel confident with my installation and would rather
> start from scratch. Is this possible?
OK, I think I got it.
My ~/.guix-profile folder seemed to be the problem, because it only
contained etc and share and no bin. I have removed it and made it a
symlink to /var/guix/profiles/per-user/garjola/guix-profile.
My .bashrc contains
,----
| export PATH="$HOME/.config/guix/current/bin${PATH:+:}$PATH"
| export INFOPATH="$HOME/.config/guix/current/share/info:$INFOPATH"
| export GUIX_PROFILE="$HOME/.guix-profile"
| export GUIX_LOCPATH=$HOME/.guix-profile/lib/locale
| source "$HOME/.guix-profile/etc/profile"
`----
I think that now everything behaves as expected.
Is it correct to assume that the ~/.guix-profile has to be a link to the
per-user profile in /var?
The remaining puzzling question is why the ~/.guix-profile was like
that? I am assuming that the first guix invocation by a user after
running the installer as root should create the correct arborescences.
But since I had done some tests with guix a couple of years ago, maybe
that the folder was there already?
In any case, thanks for your patience.
Garjola.
--
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-03-17 13:22 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-16 20:31 Packages don't get installed in the correct path Garjola Dindi
2021-03-17 6:51 ` Tobias Geerinckx-Rice
2021-03-17 7:31 ` Garjola Dindi
2021-03-17 7:49 ` Ricardo Wurmus
2021-03-17 9:25 ` Garjola Dindi
2021-03-17 13:22 ` Garjola Dindi
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.