unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Marius Bakke <marius@gnu.org>
To: Zelphir Kaltstahl <zelphirkaltstahl@posteo.de>,
	help-guix <help-guix@gnu.org>
Subject: Re: Repair / reinstall Guix package manager (foreign distro)
Date: Sun, 28 Jun 2020 20:25:54 +0200	[thread overview]
Message-ID: <87tuyvavyl.fsf@gnu.org> (raw)
In-Reply-To: <25e841cb-66c3-0aeb-f3b5-ab380784a1a1@posteo.de>

[-- Attachment #1: Type: text/plain, Size: 3154 bytes --]

Zelphir Kaltstahl <zelphirkaltstahl@posteo.de> writes:

> Hi Guix Users!
>
> I would like to repair or reinstall my Guix package manager
> installation, because it seems broken and nothing I tried fixes the problem.
>
> The problem:
>
> ~~~~
> xiaolong@xlx200:~/Downloads$ guix pull
> Migrating profile generations to '/var/guix/profiles/per-user/xiaolong'...
> guix pull: error: symlink: File exists: "/var/guix/profiles/per-user/xiaolong/current-guix"
> ~~~~
>
> It started appearing, when I once ran `guix pull` and `guix package -u`
> as `root` user, to update my locales in the root profile.

This can happen if you become root by any other method than 'sudo -i' or
'su -', because the root shell will otherwise inherit variables such as
$HOME, leading to this problem.

[...]

> ~~~~
> xiaolong@xlx200:~/Downloads$ guix pull
> Migrating profile generations to '/var/guix/profiles/per-user/xiaolong'...
> Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.org/git/guix.git'...
> guix pull: error: Git error: failed open - '/home/xiaolong/.cache/guix/checkouts/pjmkglp4t7znuugeurpurzikxq3tnlaywmisyr27shj7apsnalwq/.git/FETCH_HEAD' is locked: Permission denied
> ~~~~

You can fix this by either deleting the directory, or

   sudo chown -R xiaolong:xiaolong /home/xiaolong/.cache/guix/checkouts/pjmkglp4t7znuugeurpurzikxq3tnlaywmisyr27shj7apsnalwq

Similarly, chowning or deleting /var/guix-profiles/per-user/xiaolong is
the only way to fix the permissions issue on the profile.

[...]

> So I a basically giving up now and want to reinstall. I downloaded the
> install script `guix-install.sh` from the website and ran it:
>
> ~~~~
> xiaolong@xlx200:~/Downloads$ sudo bash guix-install.sh 
>
> (... big GUIX logo here ...)
>
> This script installs GNU Guix on your system
>
> https://www.gnu.org/software/guix/
> Press return to continue...
> [1593338927.330]: Starting installation (So 28. Jun 12:08:47 CEST 2020)
> [1593338927.333]: [ PASS ] verification of required commands completed
> [1593338927.364]: [ INFO ] init system is: systemd
> [1593338927.368]: [ INFO ] system is x86_64-linux
> [1593338928.075]: [ PASS ] Release for your system: guix-binary-1.1.0.x86_64-linux
> [1593338928.077]: [ INFO ] Downloading Guix release archive
> guix-binary-1.1.0.x86_64 100%[==================================>]  70,14M  4,27MB/s    in 21s     
> guix-binary-1.1.0.x86_64 100%[==================================>]     833  --.-KB/s    in 0s      
> [1593338949.457]: [ PASS ] download completed.
> [1593338950.341]: [ PASS ] Signature is valid.
> [1593338959.807]: [ PASS ] unpacked archive
> [1593338959.808]: [ FAIL ] A previous Guix installation was found.  Refusing to overwrite.
> ~~~~
>
> "OK OK! I'll uninstall the previous one!"
>
> But how do I do it exactly? Or is there a flag or anything I can give to
> make it overwrite the previous installation?

Reinstalling still won't fix the permissions on your
~/.cache/guix/checkouts.  But to eradicate Guix and let the script do
its thing you should 'sudo rm -rf /var/guix /gnu'.

Hope this helps!

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

  parent reply	other threads:[~2020-06-28 18:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-28 10:22 Repair / reinstall Guix package manager (foreign distro) Zelphir Kaltstahl
2020-06-28 17:53 ` david larsson
2020-06-28 18:25 ` Marius Bakke [this message]
2020-06-29 16:08   ` Zelphir Kaltstahl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87tuyvavyl.fsf@gnu.org \
    --to=marius@gnu.org \
    --cc=help-guix@gnu.org \
    --cc=zelphirkaltstahl@posteo.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).