# Perl for non-root users

**URL:** <https://forums.rockylinux.org/t/perl-for-non-root-users/12125>\
**Category:** Rocky Linux Help & Support\
**Created:** [December 11, 2023, 11:00am UTC](https://forums.rockylinux.org/t/perl-for-non-root-users/12125 "2023-12-11T11:00:30Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![nicco](https://avatars.discourse-cdn.com/v4/letter/n/b9bd4f/32.png) [@nicco](https://forums.rockylinux.org/u/nicco)\
**Post date:** [December 11, 2023, 11:00am UTC](https://forums.rockylinux.org/t/perl-for-non-root-users/12125/1 "2023-12-11T11:00:30Z")

</div>

I’ve installed perl on Rocky 8 server. Root user is ok, but non-root users can’t run perl.  
This is their error:

$ perl -V  
Can’t locate Config.pm: /usr/local/lib64/perl5/Config.pm: Permission denied.  
BEGIN failed–compilation aborted.

I checked the file and it doesn’t exist: /usr/local/lib64/perl5/Config.pm  
Hence not a permission issue.

Location of the file is:  
/usr/lib64/perl5/Config.pm

How to “properly” fix the issue and it’s not working by default, from fresh istallation?

---

<div class="post-metadata">

**Author:** ![jlehtone](https://avatars.discourse-cdn.com/v4/letter/j/e9a140/32.png) [@jlehtone](https://forums.rockylinux.org/u/jlehtone)\
**Post date:** [December 11, 2023, 11:31am UTC](https://forums.rockylinux.org/t/perl-for-non-root-users/12125/2 "2023-12-11T11:31:27Z")

</div>

el8, root:

```auto
# strace perl -V 2>&1 | grep Config.pm
stat("/usr/local/lib64/perl5/Config.pmc", 0x7ffcdb6b0c90) = -1 ENOENT (No such file or directory)
stat("/usr/local/lib64/perl5/Config.pm", 0x7ffcdb6b0c90) = -1 ENOENT (No such file or directory)
stat("/usr/local/share/perl5/Config.pmc", 0x7ffcdb6b0c90) = -1 ENOENT (No such file or directory)
stat("/usr/local/share/perl5/Config.pm", 0x7ffcdb6b0c90) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/perl5/vendor_perl/Config.pmc", 0x7ffcdb6b0c90) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/perl5/vendor_perl/Config.pm", 0x7ffcdb6b0c90) = -1 ENOENT (No such file or directory)
stat("/usr/share/perl5/vendor_perl/Config.pmc", 0x7ffcdb6b0c90) = -1 ENOENT (No such file or directory)
stat("/usr/share/perl5/vendor_perl/Config.pm", 0x7ffcdb6b0c90) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/perl5/Config.pmc", 0x7ffcdb6b0c90) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/perl5/Config.pm", {st_mode=S_IFREG|0644, st_size=3195, ...}) = 0
openat(AT_FDCWD, "/usr/lib64/perl5/Config.pm", O_RDONLY) = 4

```

el8, regular account:

```auto
$ strace perl -V 2>&1 | grep Config.pm
stat("/usr/local/lib64/perl5/Config.pmc", 0x7ffeab66d420) = -1 ENOENT (No such file or directory)
stat("/usr/local/lib64/perl5/Config.pm", 0x7ffeab66d420) = -1 ENOENT (No such file or directory)
stat("/usr/local/share/perl5/Config.pmc", 0x7ffeab66d420) = -1 ENOENT (No such file or directory)
stat("/usr/local/share/perl5/Config.pm", 0x7ffeab66d420) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/perl5/vendor_perl/Config.pmc", 0x7ffeab66d420) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/perl5/vendor_perl/Config.pm", 0x7ffeab66d420) = -1 ENOENT (No such file or directory)
stat("/usr/share/perl5/vendor_perl/Config.pmc", 0x7ffeab66d420) = -1 ENOENT (No such file or directory)
stat("/usr/share/perl5/vendor_perl/Config.pm", 0x7ffeab66d420) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/perl5/Config.pmc", 0x7ffeab66d420) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/perl5/Config.pm", {st_mode=S_IFREG|0644, st_size=3195, ...}) = 0
openat(AT_FDCWD, "/usr/lib64/perl5/Config.pm", O_RDONLY) = 4

```

Both search the same paths and neither fails for me.

> [@nicco](#):
>
> I checked the file and it doesn’t exist: /usr/local/lib64/perl5/Config.pm  
> Hence not a permission issue.

The directory `/usr/local/lib64/perl5` does not exist either, does it?  
There could be a permission issue on the path to the (non-existing) file.

---

<div class="post-metadata">

**Author:** ![nicco](https://avatars.discourse-cdn.com/v4/letter/n/b9bd4f/32.png) [@nicco](https://forums.rockylinux.org/u/nicco)\
**Post date:** [December 11, 2023, 11:53am UTC](https://forums.rockylinux.org/t/perl-for-non-root-users/12125/3 "2023-12-11T11:53:07Z")

</div>

/usr/local/lib64/perl5 directory does exist:

# ll /usr/local/lib64/perl5

total 68  
drwxr-x— 4 root root 4096 Dec 8 15:45 auto  
drwxr-x— 7 root root 4096 Dec 8 15:45 Encode  
-r–r–r-- 1 root root 32201 Nov 10 01:10 Encode.pm  
-r–r–r-- 1 root root 22950 Nov 10 01:10 encoding.pm  
drwxr-x— 2 root root 4096 Dec 8 15:45 Text

---

<div class="post-metadata">

**Author:** ![jlehtone](https://avatars.discourse-cdn.com/v4/letter/j/e9a140/32.png) [@jlehtone](https://forums.rockylinux.org/u/jlehtone)\
**Post date:** [December 11, 2023, 12:12pm UTC](https://forums.rockylinux.org/t/perl-for-non-root-users/12125/4 "2023-12-11T12:12:11Z")

</div>

First, where did they come from? `rpm -qf /usr/local/lib64/perl5/*`

Second, subdirectories show permission `0750`. What perms does the `/usr/local/lib64/perl5` have?

---

<div class="post-metadata">

**Author:** ![iwalker](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/iwalker/32/2599_2.png) [@iwalker](https://forums.rockylinux.org/u/iwalker)\
**Post date:** [December 11, 2023, 12:32pm UTC](https://forums.rockylinux.org/t/perl-for-non-root-users/12125/5 "2023-12-11T12:32:03Z")

</div>

I would say if it’s under /usr/local that they have compiled and installed perl rather than use what the system provides in the Rocky repositories. Or used a third-party repository for a newer version of perl which installs under /usr/local - which hasn’t been mentioned by the OP in what they have exactly installed and how.

In which case, something unsupported has been done. Otherwise, the perl binaries would have been in the places mentioned by @jlehtone

---

<div class="post-metadata">

**Author:** ![nicco](https://avatars.discourse-cdn.com/v4/letter/n/b9bd4f/32.png) [@nicco](https://forums.rockylinux.org/u/nicco)\
**Post date:** [December 11, 2023, 1:14pm UTC](https://forums.rockylinux.org/t/perl-for-non-root-users/12125/6 "2023-12-11T13:14:27Z")

</div>

Looks like this is specific to this server only. Maybe someone installed another Perl manually.  
Tested on a different server and it’s perl-interpreter installing into  
`/usr/lib64/perl5/Config.pm`  
and  
`/usr/local/lib64/perl5/': No such file or directory`

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/rockylinux/original/1X/91b7219eec10e30013422e4df76c1d898711a5d5.svg) [@system](https://forums.rockylinux.org/u/system)\
**Post date:** [February 9, 2024, 1:15pm UTC](https://forums.rockylinux.org/t/perl-for-non-root-users/12125/7 "2024-02-09T13:15:08Z")

</div>

Closed on February 9, 2024, 1:15pm UTC

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
