spellbook icon indicating copy to clipboard operation
spellbook copied to clipboard

permission denied at trying install missing perl module

Open andersonbosa opened this issue 2 years ago • 3 comments

Describe the bug

A clear and concise description of what the bug is.

When trying to install the tool, it could not be started. Apparently, a Perl module (Find::Lib) is missing, however, when trying to install it (with cpan install Find::Lib) doesn't have permission (see issue-2.png) to create a repository /usr/local/man/man3.

  • I asked myself then, is it necessary to run as an administrator? Should be necessary to change the ownership from /usr/local/man/*?

To Reproduce

Steps to reproduce the behavior:

  1. Follow the steps from https://github.com/htrgouvea/spellbook#download-and-install to clone and install
  2. Wait it succeed
  3. Run the spellbook help perl spellbook.pl --help
  4. Observe the error point to a missing module (vide issue-1.png)
  5. Try install it with cpan install Find::Lib
  6. Observe the error `mkdir /usr/local/man/man3: Permission denied at /usr/share/perl/5.32/ExtUtils/Install.pm line 489. (vide issue-2.png)

Expected behavior

A clear and concise description of what you expected to happen.

I did expect running the spells :pleading_face:

Screenshots

If applicable, add screenshots to help explain your problem.

  • issue-1 issue-1
  • issue-2 issue-2

Desktop (please complete the following information):

  • /proc/version: Linux version 5.14.0-kali4-amd64 ([email protected]) (gcc-10 (Debian 10.3.0-12) 10.3.0, GNU ld (GNU Binutils for - Debian) 2.37) #1 SMP Debian 5.14.16-1kali1 (2021-11-05)
  • released at: 2021.3

Additional context

Add any other context about the problem here.

andersonbosa avatar Nov 25 '21 21:11 andersonbosa

Recently I changed my OS to pop_os! 21, I'll validate this here and after reproduce in a kali VM to debug this issue.

andersonbosa avatar Dec 23 '21 10:12 andersonbosa

Hey @andersonbosa, you can try with sudo?

htrgouvea avatar Jan 13 '22 11:01 htrgouvea

https://gist.github.com/andersonbosa/d6230a5565afcb342bc716fc4e583972

solved

i wll add more information later

image

andersonbosa avatar Jan 20 '22 17:01 andersonbosa

How to install cpanminus on Ubuntu 20.04?

What is cpanminus? Is a script to automatically download, build and install Perl modules from CPAN. It requires zero configuration and has a low memory footprint.

There are three ways to install cpanminus: using apt-get, apt, or aptitude.

  1. To install using apt-get, run the command sudo apt-get update to update the apt database, then run sudo apt-get -y install cpanminus to install cpanminus.
  2. To install using apt, run the command sudo apt update to update the apt database, then run sudo apt -y install cpanminus to install cpanminus.
  3. To install using aptitude, first install aptitude using sudo apt-get install aptitude, then run sudo aptitude update to update the apt database, and finally run sudo aptitude -y install cpanminus to install cpanminus.

source: https://installati.one/install-cpanminus-ubuntu-20-04/


@htrgouvea my problem was that I couldn't install cpanm. Issue resolved :heavy_check_mark:

andersonbosa avatar Mar 31 '23 20:03 andersonbosa