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

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.

Replies are listed 'Best First'.
Re^4: [RAKU] How to install zef on Ubuntu 22.04
by Polyglot (Chaplain) on Dec 28, 2023 at 09:11 UTC
    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).

        I'm the server's admin, and only user. To my mind, it matters little which user installs it. If there were other users, however, I would be even more inclined to install as root so that they, too, could use zef. Any root/sudo user should be able to use it, in my opinion. It has been my experience, though, that when installing applications, the root user generally succeeds better as it will encounter fewer permissions-related issues.

        Nevertheless, being willing to attempt your suggestion, I received the below results...

        Cloning into 'zef'... remote: Enumerating objects: 11711, done. remote: Counting objects: 100% (1112/1112), done. remote: Compressing objects: 100% (536/536), done. remote: Total 11711 (delta 670), reused 946 (delta 558), pack-reused 1 +0599 Receiving objects: 100% (11711/11711), 2.38 MiB | 10.90 MiB/s, done. Resolving deltas: 100% (7195/7195), done. failed to create directory: /tmp/.zef/1703756967.189511/1703756975.189 +511.3413.866087216334
        Any ideas?

        (NOTE: I've edited my original post to add a link showing that "zef" was deliberately removed from Ubuntu's 22.04 repository. That's why all this manual installation is necessary...and complicated. I'm not sure if Raku's developers dropped the ball, owing to name-changes from Perl6, or if Ubuntu's developers were doing something nefarious, but it is what it is.)

        Blessings,

        ~Polyglot~