GUIX package manager - not that difficult

13 réponses [Dernière contribution]
GNUbahn
Hors ligne
A rejoint: 02/18/2016

I just installed the GUIX package manager with success. While this is no hassle for many users here, for some of us doing something that looks like a possible hard time with a high risk of failure.

I just wanted to tell other users, who like me are not too familiar with and too knowledgeable about computers, that it was not that difficult. I did have to read the instructions *carefully*, and a number of times I did the same commands - just to be sure, since there was no affirmative response.

So if you're considering: Go ahead and don't hesitate to ask.

Magic Banana

I am a member!

I am a translator!

Hors ligne
A rejoint: 07/24/2010

A command that prints nothing and gives you the hand back is (well, should always be) a command that did the work successfully.

eric23
Hors ligne
A rejoint: 06/30/2017

echo $?

I've been to told to use this command to see if a command is successful. It spits out the exit code of the previous command.

Magic Banana

I am a member!

I am a translator!

Hors ligne
A rejoint: 07/24/2010

Indeed. 0 means the execution was successful. Otherwise, there was an error. The number (an integer between 0 and 255) indicates the exit status. It is usually described in the manual of the command. Although nothing forces programmers to use the same numbers for the same kinds of errors, many use those in /usr/include/sysexits.h for typical errors.

All that said, exit statuses are for machines: scripts calling the command can behave differently depending on its exit status. There is little reason for a programmer to set an error status without displaying as well an error message for the user.

andyprough
Hors ligne
A rejoint: 02/12/2015

I agree, I tried and failed a couple of times to install it in years past. But this year, motivated by chaosmonk's posts about it, I've installed it without trouble on several machines. I think it's an amazing technology which makes a massive amount of software available. I think it's a far better alternative package manager than flatpak.

lutes
Hors ligne
A rejoint: 09/04/2020

Definitely.

I had to overcome a few hurdles but everything could be solved either by correcting initial flops (like using sudo instead of sudo -i or sudo su) or modifying profile along the lines of this post: https://trisquel.info/en/forum/guix-trisquel#comment-122789 or this one from the archives: https://listas.trisquel.info/pipermail/freedom-misc/2020-August/007044.html.

Someone must have pressed the wrong button and flushed their own thread from the forum.

EDIT: better follow the instructions from the installation guide.

Geshmy
Hors ligne
A rejoint: 04/23/2015

I didn't know my password for su after a fresh install. A lot of those instructions at

https://guix.gnu.org/manual/en/html_node/Binary-Installation.html

didn't work for me using sudo. Some of them I could modify in a text editor (for example - add a sudo before do in a loop) and paste them in but sometimes I still couldn't get the right outcome.

So I used sudo to change root's password to something I would know.
That definitely made it easier.

After a fresh install of Trisquel-mini on my PC and enabling myself to su to install guix, guix seems to be running without errors.

Magic Banana

I am a member!

I am a translator!

Hors ligne
A rejoint: 07/24/2010

The following command essentially provides a root terminal, without having to give root a password:
$ sudo -i

GNUbahn
Hors ligne
A rejoint: 02/18/2016

Running `sudo --help' says
-i, --login run login shell as the target user; a command
may also be specified

As far as I can see (which isn't far) the only difference between running `sudo -i' and `sudo su' is that the former switches to root@machine:~# (which I believe is the home folder) whereas the latter switches to root@machine:/current/path#

What does "essentially" mean in this context?

Magic Banana

I am a member!

I am a translator!

Hors ligne
A rejoint: 07/24/2010

As it stands, sudo -i is the most practical, clean way to gain a root environment.
https://www.maketecheasier.com/differences-between-su-sudo-su-sudo-s-sudo-i/

There are differences (hence my use of "essentially") in the provided environments (for instance 'sudo su' does not change directory, whereas it becomes /root with 'sudo -i'):
$ sudo -i set > sudo-i-env
$ sudo su -c set > sudo-su-env
$ diff sudo-i-env sudo-su-env
2c2
< BASHOPTS=cmdhist:complete_fullquote:extquote:force_fignore:hostcomplete:interactive_comments:login_shell:progcomp:promptvars:sourcepath
---
> BASHOPTS=cmdhist:complete_fullquote:extquote:force_fignore:hostcomplete:interactive_comments:progcomp:promptvars:sourcepath
13,14c13
< DEFAULT_XDG_CONFIG_DIRS=/etc/xdg
< DEFAULT_XDG_DATA_DIRS=/usr/local/share/:/usr/share/
---
> DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/0/bus
19d17
< GTK_MODULES=gail:atk-bridge
25c23
< LANGUAGE=fr_FR:en_US:en
---
> LANGUAGE=fr:en_US:en
43,45c41,42
< PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
< PIPESTATUS=([0]="0")
< PPID=19916
---
> PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
> PPID=19949
47c44
< PWD=/root
---
> PWD=/home/banana
51c48
< SUDO_COMMAND='/bin/bash -c set'
---
> SUDO_COMMAND='/bin/su -c set'
60c57,59
< _=true
---
> XDG_RUNTIME_DIR=/run/user/0
> XDG_SESSION_ID=2
> _=bash

I think those differences make no difference for the installation of GNU Guix. I have not tried though.

GNUbahn
Hors ligne
A rejoint: 02/18/2016

I think those differences make no difference for the installation of GNU Guix

Combining your description with the guide for installing Guix and my recollection of installing it, I agree.

Geshmy
Hors ligne
A rejoint: 04/23/2015

Well, learning something new every day; adding 'sudo -i' to my growing repertoire.
Merci mucho!

Malsasa
Hors ligne
A rejoint: 12/01/2016

My favorite Guix commands:

To search application:
$ guix search [keywords]

To add application:
$ guix install [software]

To remove application:
$ guix remove [software]

To free some disk space:
$ guix gc

lutes
Hors ligne
A rejoint: 09/04/2020

I would add the update command:

$ guix pull

https://guix.gnu.org/manual/en/guix.html#Invoking-guix-pull