From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id kGQqO05F92WVLQAAqHPOHw:P1 (envelope-from ) for ; Sun, 17 Mar 2024 20:32:31 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id kGQqO05F92WVLQAAqHPOHw (envelope-from ) for ; Sun, 17 Mar 2024 20:32:31 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=zancanaro.id.au header.s=k1 header.b=P3rBjbqi; dmarc=pass (policy=none) header.from=zancanaro.id.au; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1710703950; a=rsa-sha256; cv=none; b=K7qPSwsz/mb08Op36TRmbEeyXsO5mHG2yluU7aGZOPU1aIvZ0j3hW8J95U5uRpee2mWzth p5vBGRoU2NLrVRe4RTW6eseVdP1Osvs6CuuWXDaWuKB9OuddrqnjbPDPmHRXRdffWDNT3a X8u7IpcSEhKiw5e6iLdLJJKsBmSHBSxM0TcmnhCxDgKOaPYKZdpyVvf2Pz0GY3mUYDiTP4 Jf9YWkKX1pvtOSDnSrSs4njDQYdxP0y9uP+cdO7gB7Rh/Lyr8HqJAfrKIjRCpmRVImhmwV DDSRilC5mGoqi3CTM+KAtuPmmsUTwPrlpb89Ra1fS3rJtzaQGd7FISXHBF1zFA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=zancanaro.id.au header.s=k1 header.b=P3rBjbqi; dmarc=pass (policy=none) header.from=zancanaro.id.au; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1710703950; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=Nov8T5wGOFSqwvhgzkbKMhD9SeeuHUtQLOwRrMcyMcE=; b=AqIeq7j7sdNziCS8bNneQjlnEhZQ3463Jf2dz21z3cyi2nWB6dgaUmQQvCqcfAWH1s6axH vfxwL//wjPMj3INt3warkZTb4ynFQvKZiJbqVhi3y9hO3jfwcYRBgQYYmqR4acgFDf6qQL QU5lIgmPLBmyLb/7MbdPjGIEPdcBhvMFYH1uak5atWZDOSJ7RAV5t0Dk21j4oXyBIXQEvk w6+SJl7oh/9xNeWQNaf4n2gCCWriifIJnbV/70Jxg23yDWuZQgh8Woub6MxkrqXocfi7pe UKFu50WYNFuVplYZISmi8L0NRTZULneO+aQ9i85LKslbVG7kfcYMv0FYX+7e2g== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 9636E91B0 for ; Sun, 17 Mar 2024 20:32:30 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rlwEo-0001ba-Pu; Sun, 17 Mar 2024 15:32:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rlwEm-0001bM-CO for help-guix@gnu.org; Sun, 17 Mar 2024 15:32:04 -0400 Received: from voltorb.zancanaro.id.au ([45.77.50.64]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rlwEj-0006if-M3 for help-guix@gnu.org; Sun, 17 Mar 2024 15:32:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; s=k1; bh=Nov8T5wGOFSqwvh gzkbKMhD9SeeuHUtQLOwRrMcyMcE=; h=date:references:in-reply-to:subject: cc:to:from; d=zancanaro.id.au; b=P3rBjbqidY84PeCoFc0CxdiI8IBGcq6J6DxoD Filxcy9DX54skLzS82yz9/NFws8ItSfmONttuXr2Nvgr/HeDxjmoRNFt5HXaVOeZq7JnAT Ku/5hSL49qb1z45z1D6ABEX3zL08AnI6gNspoipm/DbD5QBUgeChcb8/QgBDVo7g= Received: by voltorb.zancanaro.id.au (OpenSMTPD) with ESMTPSA id a5e3e1b9 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Sun, 17 Mar 2024 19:31:46 +0000 (UTC) From: Carlo Zancanaro To: Thomas Bennett Cc: help-guix@gnu.org Subject: Re: consider setting the necessary environment variables In-Reply-To: <2341ca5e-9655-45b3-a736-9fd75ea8cc8e@caminu.fr> (Thomas Bennett's message of "Sun, 17 Mar 2024 12:40:47 +0100") References: <2341ca5e-9655-45b3-a736-9fd75ea8cc8e@caminu.fr> Date: Mon, 18 Mar 2024 06:31:53 +1100 Message-ID: <87zfuwpsd2.fsf@zancanaro.id.au> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=45.77.50.64; envelope-from=carlo@zancanaro.id.au; helo=voltorb.zancanaro.id.au X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: help-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Scanner: mx10.migadu.com X-Migadu-Spam-Score: -8.33 X-Spam-Score: -8.33 X-Migadu-Queue-Id: 9636E91B0 X-TUID: VVIjdp24YvS3 Hi Thomas, On Sun, Mar 17 2024, Thomas Bennett wrote: > I have an issue where my root user seems to be unable to have its > environment set. That sounds annoying! Hopefully we can figure out what's going wrong for you. =F0=9F=99=82 > # tail /root/.bashrc > [...] > > GUIX_PROFILE=3D"/root/.config/guix/current" > . "$GUIX_PROFILE/etc/profile" This sets the GUIX_PROFILE variable to the current Guix profile. This adds the "guix" command to your PATH, but not any of your installed packages. There are two main profiles that you need to source. One if the current Guix profile, in $HOME/.config/guix/current, and the other is your user's package profile, in $HOME/.guix-profile. The former is suggested when you run "guix pull", and the latter is suggested when you run "guix package" commands (including shorthands like "guix install"). We can see this in your output: > root@brain ~# guix package -i bat > [...] > hint: Consider setting the necessary environment variables by running: > > =C2=A0=C2=A0=C2=A0 GUIX_PROFILE=3D"/root/.guix-profile > =C2=A0=C2=A0=C2=A0 . "$GUIX_PROFILE/etc/profile" > > Alternately, see `guix package --search-paths -p "/root/.guix-profile"'. You mention: > I tried to manually source "$GUIX_PROFILE/etc/profile" but it's no > better. but it's not clear whether you set GUIX_PROFILE to /root/.guix-profile before doing so. Can you try using this as your Guix initialisation code in your shell? --8<---------------cut here---------------start------------->8--- GUIX_PROFILE=3D"$HOME/.guix-profile" . "$GUIX_PROFILE/etc/profile" GUIX_PROFILE=3D"$HOME/.config/guix/current" . "$GUIX_PROFILE/etc/profile" unset GUIX_PROFILE --8<---------------cut here---------------end--------------->8--- As an additional gotcha that might cause problems for you in future: the usual advice in Guix is to source your profiles in .bash_profile rather than .bashrc. This allows "guix shell" to source .bashrc in a --pure environment without also including your entire user profile. Carlo