GUIX package manager - not that difficult
- Anmelden oder Registrieren um Kommentare zu schreiben
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.
A command that prints nothing and gives you the hand back is (well, should always be) a command that did the work successfully.
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.
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.
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.
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.
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.
The following command essentially provides a root terminal, without having to give root a password:
$ sudo -i
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?
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.
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.
Well, learning something new every day; adding 'sudo -i' to my growing repertoire.
Merci mucho!
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
I would add the update command:
$ guix pull
- Anmelden oder Registrieren um Kommentare zu schreiben