New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
install zef as user #91
Comments
HI @bazzaar, I am not able to reproduce it on a fresh openSUSE Leap 15.4 install: $ podman run -ti --rm opensuse/leap:15.4
18094fc5064d:/ # zypper install curl sudo
Retrieving repository 'Update repository of openSUSE Backports' metadata .[done]
Building repository 'Update repository of openSUSE Backports' cache ......[done]
Retrieving repository 'Non-OSS Repository' metadata ......................[done]
Building repository 'Non-OSS Repository' cache ...........................[done]
Retrieving repository 'Main Repository' metadata .........................[done]
Building repository 'Main Repository' cache ..............................[done]
Retrieving repository 'Update repository with updates from SUSE Linux Ente[done]
Building repository 'Update repository with updates from SUSE Linux Enterp[done]
Retrieving repository 'Main Update Repository' metadata ..................[done]
Building repository 'Main Update Repository' cache .......................[done]
Retrieving repository 'Update Repository (Non-Oss)' metadata .............[done]
Building repository 'Update Repository (Non-Oss)' cache ..................[done]
Loading repository data...
Reading installed packages...
Resolving package dependencies...
The following 2 NEW packages are going to be installed:
curl sudo
2 new packages to install.
Overall download size: 2.1 MiB. Already cached: 0 B. After the operation,
additional 7.7 MiB will be used.
Continue? [y/n/v/...? shows all options] (y): y
Retrieving package sudo-1.9.9-150400.2.5.x86_64
(1/2), 1.7 MiB ( 7.0 MiB unpacked)
Retrieving: sudo-1.9.9-150400.2.5.x86_64.rpm .............................[done]
Retrieving package curl-7.79.1-150400.5.6.1.x86_64
(2/2), 463.8 KiB (729.5 KiB unpacked)
Retrieving: curl-7.79.1-150400.5.6.1.x86_64.rpm ..........................[done]
Checking for file conflicts: .............................................[done]
(1/2) Installing: sudo-1.9.9-150400.2.5.x86_64 ...........................[done]
(2/2) Installing: curl-7.79.1-150400.5.6.1.x86_64 ........................[done]
18094fc5064d:/ # curl -1sLf 'https://dl.cloudsmith.io/public/nxadm-pkgs/rakudo-pkg/setup.rpm.sh' | sudo -E bash
Executing the setup script for the 'nxadm-pkgs/rakudo-pkg' repository ...
OK: Checking for required executable 'curl' ...
OK: Checking for required executable 'rpm' ...
OK: Detecting your OS distribution and release using system methods ...
^^^^: ... Detected/provided for your OS/distribution, version and architecture:
>>>>:
>>>>: ... distro=opensuse-leap version=15.4 codename=15.4 arch=x86_64
>>>>:
OK: Importing 'nxadm-pkgs/rakudo-pkg' repository GPG keys into rpm ...
OK: Checking for available package manager (DNF/Microdnf/YUM/Zypper) ...
^^^^: ... Detected package manager as 'zypper'
OK: Checking if upstream install config is OK ...
OK: Fetching 'nxadm-pkgs/rakudo-pkg' repository configuration ...
OK: Installing 'nxadm-pkgs/rakudo-pkg' repository via zypper ...
OK: Updating the zypper cache to fetch the new repository metadata ...
OK: The repository has been installed successfully - You're ready to rock!
18094fc5064d:/ # zypper install rakudo-pkg
Retrieving repository 'nxadm-pkgs-rakudo-pkg-noarch' metadata ............[done]
Building repository 'nxadm-pkgs-rakudo-pkg-noarch' cache .................[done]
Loading repository data...
Reading installed packages...
Resolving package dependencies...
The following NEW package is going to be installed:
rakudo-pkg
1 new package to install.
Overall download size: 14.5 MiB. Already cached: 0 B. After the operation,
additional 55.0 MiB will be used.
Continue? [y/n/v/...? shows all options] (y): y
Retrieving package rakudo-pkg-2022.7.0-01.x86_64
(1/1), 14.5 MiB ( 55.0 MiB unpacked)
Retrieving: rakudo-pkg-openSUSE15.4-2022.07-01.x86_64.rpm ..[done (671.8 KiB/s)]
Checking for file conflicts: .............................................[done]
(1/1) Installing: rakudo-pkg-2022.7.0-01.x86_64 ..........................[done]
18094fc5064d:/ # /opt/rakudo-pkg/bin/install-zef
===> Testing: zef:ver<0.13.8>:auth<github:ugexe>:api<0>
===> Testing [OK] for zef:ver<0.13.8>:auth<github:ugexe>:api<0>
===> Installing: zef:ver<0.13.8>:auth<github:ugexe>:api<0>
1 bin/ script [zef] installed to:
/root/.raku/bin
Don't forget to add '~/.raku/bin' to your PATH,
e.g. by adding this to .profile:
export PATH=~/.raku/bin:$PATH
Feel free to reopen the issue if you can reproduce it. Maybe there was a temporary upstream problem? The script downloads the latest released zef from github directly. |
Hi @nxadm , I've tried again (this time on another new build, different machine). I still get the same result (see below). The difference might be I'm installing via YAST? I added the rakudo-pkg repository as per the instructions on the dl.cloudsmith.io [Suse/Zypper] page aaaa@bbbbbb:~> sudo zypper repos
I then installed rakudo-pkg in the YAST package manager. I added rakudo to the users path,
Then tried the zef install, aaaa@bbbbbb:~> /opt/rakudo-pkg/bin/install-zef
aaaa@bbbbbb:~> I didn't know how to reopen this issue, so I've just added this comment. |
Looks like this issue also occurs with Fedora 36. Just did a fresh install and was able to install rakudo-pkg via the automated bash script, but the moment I tried to run
|
It is weird I can't reproduce it:
Is it a recent installation? Is rakudo-pkg up-to-date ( |
@nxadm yeah, by sheer coincidence, I had installed Fedora 36 in a VM via the ISO on their official page minutes before my first comment to test whether an issue with another Raku module occurred in Fedora. I had run the setup script for rakudo-pkg as a regular user, then used Unlikely as it may be, could there be a difference in the configuration when yoi install in a container? |
Or perhaps the fact that you installed zef as root first? Seems unlikely though. Let me try and capture my entire terminal output from the beginning to the end of the rakudo-pkg setup and see if it gives us a hint... |
Alright, here is everything I see, from the initial setup of the package in dnf as a source to the attempt to install zef:
|
Okay, as a sanity check, I tried running install-zef via sudo and that worked! Then when I ran it as a regular user right after that it also worked. So basically, if the person installing zef doesn't have sudo privileges they won't be able to proceed.
|
Uhhhh, so I hate to break it to you @nxadm but apparently this is broken on Ubuntu 20.04LTS as well... |
I stumbled upon the same problem today when trying to run What I noticed so far was that the underlying error happened here: https://github.com/ugexe/zef/blob/0952bcbcbb/lib/Zef/Client.rakumod#L1084 From what I was able to see from adding some debugging output, the CATCH block didn't caught the expected
but a
So a new While I was still debugging, the command |
It looks like
before. (Once is enough.) And it fails consistently when I don't do that. Maybe some Rakudo bug with precompilation, @ugexe Did you by chance see something similar before? |
I've never seen such an error, no. It seems like a rakudo precompilation bug to me |
Thanks for looking. BTW, the I'm trying (but struggling) to golf the problem down, before opening an issue over at https://github.com/rakudo/rakudo/issues. |
Thank you all for following this up. It looks like @usev6 found a workaround for the time being ( Zef is installed for the root user in /opt/rakudo-pkg, but in principle /opt/rakudo-pkg/bin/install-zef just uses raku to install a fresh zef. Maybe it gets confused by existing precompiled dirs in /opt/rakudo-pkg, when it should not. I'll wait a little to see if @usev6 is able to golf it to pass it on to rakudo, and add the workaround to the packages. |
I think I've tracked the problem down (or at least have made substantial progress). If I'm not mistaken the error pops up, because Rakudo tries to precompile stuff (and especially My golfed version of the problem looks like this. (It only works if
Without the
|
Added the workaround for the moment: |
I will close this as the workaround seems to work. Please re-open if this is broken for you in the last package. |
System is Opensuse Leap 15.4, on x86_64
The command that's detailed in the rakudo_pkg readme, to install zef as user -
... didn't work for me. One of the tests failed with the message complaining about sic. not finding a dependency(s).
I seem to remember npm might have been mentioned too?
I tried a couple of times, no luck, (deleting the .zef dir after each failed attempt)
and then tried using the different instructions on the ugexe/zef github page -
which successfully installed zef without error. (Subsequently I've been able to install all the modules I need.)
Also, since then I found that npm / nodejs were not installed on my (new build) system, and have now added them.
I looked for a page or section that detailed rakudo / zef system dependencies, but did not find anything.
The text was updated successfully, but these errors were encountered: