in reply to Re: [RAKU] How to install zef on Ubuntu 22.04
in thread [RAKU] How to install zef on Ubuntu 22.04

The output of that command was this:
===> Staging zef:ver<0.21.2>:auth<github:ugexe>:api<0> ===> Staging [OK] for zef:ver<0.21.2>:auth<github:ugexe>:api<0> No such method 'remove-artifacts' for invocant of type 'CompUnit::Repository::Staging'
Raku makes no claims, so far as I can see, to even having installed zef, much less telling me the path to it. When I navigate to /usr/src/zef/bin and run zef directly, I still get this:
/usr/src/zef/bin# zef Command 'zef' not found, did you mean: command 'zed' from deb zfs-zed (2.1.5-1ubuntu6~22.04.1) command 'zec' from deb zec (0.12-5) Try: apt install <deb name>
In order to actually execute it, I must invoke it as a script, or run it with Raku, like this:
/usr/src/zef/bin# raku zef ===SORRY!=== Error while compiling /usr/src/zef/bin/zef Could not find Zef::CLI in: inst#/root/.raku inst#/usr/lib/perl6/site inst#/usr/lib/perl6/vendor inst#/usr/lib/perl6/core ap# nqp# perl5# at /usr/src/zef/bin/zef:3
...and you can see the result there. This is the same result as if trying to run it via the full path, i.e. /usr/src/zef/bin/zef.

Note that no man pages exist for zef, and a which zef command returns empty.

Blessings,

~Polyglot~

Replies are listed 'Best First'.
Re^3: [RAKU] How to install zef on Ubuntu 22.04
by Corion (Patriarch) on Dec 28, 2023 at 08:45 UTC

    Yes, I think you should debug why the installation instructions fail.

    As for the "zef binary not found" part, you seem to be running as root and traditionally, the current directory (., dot) is not in the search path. You want to try to execute zef by launching it as ./zef or /usr/src/zef/bin/zef.

    Launching the zef script as raku zef seems to indicate that some prerequisites are missing or that the raku search path is not set up correctly for launching this. Most likely you want to launch it as raku -Ilib bin/zef from the repository main directory, /usr/src/zef.

      That got me a little farther, +1. The install failed unless run as root, but as root, resulted in this:
      # raku -Ilib bin/zef install DBIish ===> Searching for: DBIish ===> Searching for missing dependencies: NativeHelpers::Blob, NativeLi +bs:ver<0.0.9+>:auth<github:salortiz>, NativeCall::TypeDiag ===> Searching for missing dependencies: File::Temp ===> Searching for missing dependencies: File::Directory::Tree ===> Staging NativeHelpers::Blob:ver<0.1.12>:auth<github:salortiz> ===> Staging [OK] for NativeHelpers::Blob:ver<0.1.12>:auth<github:salo +rtiz> ===> Staging NativeLibs:ver<0.0.9>:auth<github:salortiz> ===> Staging [OK] for NativeLibs:ver<0.0.9>:auth<github:salortiz> ===> Staging File::Directory::Tree ===> Staging [OK] for File::Directory::Tree ===> Staging File::Temp:ver<0.0.10>:auth<zef:rbt> ===> Staging [OK] for File::Temp:ver<0.0.10>:auth<zef:rbt> ===> Staging NativeCall::TypeDiag ===> Staging [OK] for NativeCall::TypeDiag ===> Staging DBIish:ver<0.6.6>:auth<zef:raku-community-modules>:api<1> ===> Staging [OK] for DBIish:ver<0.6.6>:auth<zef:raku-community-module +s>:api<1> No such method 'remove-artifacts' for invocant of type 'CompUnit::Repository::Staging'
      However, not being able to install normally means that even "installed" modules aren't found...
      ===SORRY!=== Error while compiling /home/myuser/rakusessiontest.raku Could not find DBIish in: inst#/root/.raku inst#/usr/lib/perl6/site inst#/usr/lib/perl6/vendor inst#/usr/lib/perl6/core ap# nqp# perl5# at /home/myuser/rakusessiontest.raku:4
      I'm not sure where to go from here. My "zef" is not yet working properly, it seems. The online guides for working around the problem of this library not being included in this linux distribution are either incomplete or out-of-date. As an ubuntu user for the past twenty years, I'm not ready to switch distros. Maybe I'll have to wait until April 2024 when the next Ubuntu LTS comes out before I can use Raku? That would be a terrible delay.

      Blessings,

      ~Polyglot~

        No such method 'remove-artifacts' for invocant of type 'CompUnit::Repo +sitory::Staging'

        For some reason the install still fails, but my Google searches don't turn up anything helpful.

        Personally, I would try to avoid using the root account to install stuff and instead run the installation as a normal user, below the /home/corion (or in your case, /home/polyglot) directory. Maybe the installation does not cope well with root permissions or something like that. Until you get zef to install properly, trying to install other stuff is likely futile.

        Can you try and re-run the installation under your normal user, maybe in a separate directory?

        who am i cd $HOME mkdir raku-zef-install cd raku-zef-install git clone https://github.com/ugexe/zef.git cd zef raku -I. bin/zef install .

        This could maybe install zef for your local user (instead of root, or everyone on the machine).