in reply to How do I install a Perl module?

Short answer: The installation instructions in the README.md file cover Ubuntu.

Long answer: Prima is not available from Ubuntu, and if it were, its package name would certainly obey the Debian naming convention and be named libprima-perl. If you download a module from CPAN for manual installation, you should always look in its root directory for installation instructions. Just copying the stuff to /usr/share/perl5 is not the way to install from CPAN and will fail for many modules. In particular, modules containing parts written in C (like Prima) will never work that way.

Replies are listed 'Best First'.
Re^2: How do I install a Perl module?
by harangzsolt33 (Deacon) on Oct 28, 2023 at 16:00 UTC
    Yes, it is a bit weird that no script exists to install Prima. I have a Brother printer, and when I wanted to install the drivers for linux, I went to the website, and they had a little install script for the Brother printers. I downloaded the script and executed it from the terminal, and it did everything to make the printer work. It was EASY. But the installation of Prima doesn't seem very easy. I mean it gave me all sorts of error messages at first. It did not find the libraries, so I installed them. Thank you for pointing me to README.md! Coming from Windows, the .md file extension did not seem familiar to me. If it had been README.txt I would have opened it for sure.

    I ran perl Makefile.PL and I did not have gcc installed the way Makefile expected it, so I had to create a symbolic link in /bin for the gcc compiler. After that, it ran okay. Next, I tried to issue the make command, but it did not exist, so I had to install make. Then I began the make process. While it was compiling, it did show 3 or 4 error messages in the source code, but it scrolled by so fast, I couldn't remember all of what I saw. One of the errors was regarding a function call to strlcpy() and it said it doesn't exist, did you mean to use strncpy() instead? Another error existed in a calculation, but I can't remember where I saw it.

    Anyway, I looked and saw that it actually installed Prima into this directory:

    /usr/local/lib/x86_64-linux-gnu/perl/5.36.0/Prima

    Then I tried some examples, and they worked. So, it looks like it's a success! But it could have been easier. Ahem.