From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id aBh4AqssQmbFLwEAe85BDQ:P1 (envelope-from ) for ; Mon, 13 May 2024 17:07:23 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id aBh4AqssQmbFLwEAe85BDQ (envelope-from ) for ; Mon, 13 May 2024 17:07:23 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=caminu.fr header.s=20220223 header.b=nPC4MEJZ; dmarc=none; 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=1715612842; 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=f3+ix1jWzyPDprJEIy6t85MDY04q8KTJ04T0nJ7+ku4=; b=OKg/SK8Y1hUfEit8XtwUOIAcsRZFjtSgaoFoCwx77w5GxVwvDfh7LgEQLbnhTboVpOI3av BAo76GePRht7mPbnqff7paF+xrvk647st7aqwekZKvX5PojY2yqCGEOPUm+PbvBQGFUeD2 cfYVPk0lK6mrS4YP2nCAv6HoIQgStFrP/4GmdfGBTNWPAvrYa0GRYSng9yJJGXUvuck7A7 l9PznEHUFWVFVLHIG+T8bweP3fgS4AR3sMjTeVmAiWFMZSV+XN6Wl6yyQXNLa1f3pBJn9/ dHlwH3JrypX6KthSI2gxkzXcsItAlahlY98RI1XbZK0iL2VoKlRCIPJRj5xGkA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1715612842; a=rsa-sha256; cv=none; b=JMrRHSB/vTID7Z7qdBDO+HHcYD9InemVRAybkvgG/LRIpPh/S6mvlCtTAPZ3eBWu5XwwgQ KYykazltavsvWMJ8yg2m7+fhnhpTmiVObZKVxG0Db7Mj+CwyRqwY6D/tjhNNrULrQNRPM0 OkDKpmQjhHcwVtlnwAbzZPPQhaIxtThubEMGAvWO7LXxxxvEx0QsQW0NgjypN+1MCmK4/R tnG6gh+MgHIeE8xpA0ooulS/BB+Ekgmy3pZFYosCb03VXuynJuHTcqH/yewZX4sdIUfzOK zhhXwGVnnK1p2Z04OayOLCn2fFe0pvLjRuFcVkvB4zvJ2CwyuanybEMDJwRawQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=caminu.fr header.s=20220223 header.b=nPC4MEJZ; dmarc=none; 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" 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 AEE40FAB2 for ; Mon, 13 May 2024 17:07:22 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s6XG2-0004is-HE; Mon, 13 May 2024 11:06:30 -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 1s6XFy-0004iT-Ez for help-guix@gnu.org; Mon, 13 May 2024 11:06:26 -0400 Received: from smtp-8fa8.mail.infomaniak.ch ([2001:1600:4:17::8fa8]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s6XFu-0000ec-Si for help-guix@gnu.org; Mon, 13 May 2024 11:06:26 -0400 Received: from smtp-4-0000.mail.infomaniak.ch (smtp-4-0000.mail.infomaniak.ch [10.7.10.107]) by smtp-3-3000.mail.infomaniak.ch (Postfix) with ESMTPS id 4VdN9J2Cg7zm3s; Mon, 13 May 2024 17:06:12 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=caminu.fr; s=20220223; t=1715612772; bh=6AH5jLCrUaTLUsp4GCqAtV0B9xqJJe71Tibr8oTBvo0=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=nPC4MEJZCwglBVuMtYvcDHmC0c+jR6gtLtSuCWRZR9dQRXDgSCSjjrTpbO9RuGVXk S3fitKzE/GyXdI475QuemDwnaraA8S7Wfqmp0FXtHhoZF7YwvVCTlCHKcd4PWnTKJC Ava48v7AKb9qTEWQP5Lqqs0yFkzzU0qKYnnw3e9I= Received: from unknown by smtp-4-0000.mail.infomaniak.ch (Postfix) with ESMTPA id 4VdN9H6X12zFks; Mon, 13 May 2024 17:06:11 +0200 (CEST) Message-ID: Date: Mon, 13 May 2024 17:04:21 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: consider setting the necessary environment variables To: Carlo Zancanaro Cc: help-guix@gnu.org References: <2341ca5e-9655-45b3-a736-9fd75ea8cc8e@caminu.fr> <87zfuwpsd2.fsf@zancanaro.id.au> Content-Language: en-US From: Thomas Bennett In-Reply-To: <87zfuwpsd2.fsf@zancanaro.id.au> X-Infomaniak-Routing: alpha Received-SPF: pass client-ip=2001:1600:4:17::8fa8; envelope-from=tom@caminu.fr; helo=smtp-8fa8.mail.infomaniak.ch X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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-Spam-Score: -2.46 X-Spam-Score: -2.46 X-Migadu-Queue-Id: AEE40FAB2 X-Migadu-Scanner: mx11.migadu.com X-TUID: zQ0notlnYYIL Hello Carlo, Well after a while, I finally manage to take the time to deal with that issue. And... thank you very much! Indeed, I had only one profile set instead of two. I added the second and everything works like a charm. On 2024-03-17 20:31, Carlo Zancanaro wrote: > 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. 🙂 > >> # tail /root/.bashrc >> [...] >> >> GUIX_PROFILE="/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: >> >>     GUIX_PROFILE="/root/.guix-profile >>     . "$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="$HOME/.guix-profile" > . "$GUIX_PROFILE/etc/profile" > GUIX_PROFILE="$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. I moved the profiles configurations in~/.bash_profile as you mentionned and removed it from ~/.bashrc, thank for that as well. Your help was precious. Best, Thomas > > Carlo