Hello! I have the following problem in Centos 7: I go under the root and execute the command:
ls `perl -e "print qq(@INC\n);"` I get:
perl5 Next, do:
sudo su and after
ls `perl -e "print qq(@INC\n);"` And I get the paths of the pearl and the connected modules.
If I without sudo su try to run any script like this:
perl blabla.pl nothing happens and nothing swears.
The question is why? What is wrong with the root? Why doesn't perl work under it?
I fulfill:
$ echo $PATH; type perl; which perl; file $(which perl) From under the root:
[root@game ~]# echo $PATH; type perl; which perl; file $(which perl) /root/perl5/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin perl is hashed (/usr/local/bin/perl) /usr/local/bin/perl /usr/local/bin/perl: empty from under sudo su:
[root@game ~]# echo $PATH; type perl; which perl; file $(which perl) /root/perl5/bin:/sbin:/bin:/usr/sbin:/usr/bin perl is hashed (/bin/perl) /bin/perl /bin/perl: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=68e24ea1ba03faac3442ad4d448635bc8feceb4b, stripped
$ echo $PATH; type perl; which perl; file $(which perl)$ echo $PATH; type perl; which perl; file $(which perl)$ echo $PATH; type perl; which perl; file $(which perl)in both cases. - aleksandr barakin[root@game ~]# echo $PATH; type perl; which perl; file $(which perl) /root/perl5/bin:/sbin:/bin:/usr/sbin:/usr/bin perl is hashed (/bin/perl) /bin/perl /bin/perl: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=68e24ea1ba03faac3442ad4d448635bc8feceb4b, stripped[root@game ~]# echo $PATH; type perl; which perl; file $(which perl) /root/perl5/bin:/sbin:/bin:/usr/sbin:/usr/bin perl is hashed (/bin/perl) /bin/perl /bin/perl: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=68e24ea1ba03faac3442ad4d448635bc8feceb4b, stripped[root@game ~]# echo $PATH; type perl; which perl; file $(which perl) /root/perl5/bin:/sbin:/bin:/usr/sbin:/usr/bin perl is hashed (/bin/perl) /bin/perl /bin/perl: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=68e24ea1ba03faac3442ad4d448635bc8feceb4b, stripped- Relajado[root@game ~]# echo $PATH; type perl; which perl; file $(which perl) /root/perl5/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin perl is hashed (/usr/local/bin/perl) /usr/local/bin/perl /usr/local/bin/perl: empty[root@game ~]# echo $PATH; type perl; which perl; file $(which perl) /root/perl5/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin perl is hashed (/usr/local/bin/perl) /usr/local/bin/perl /usr/local/bin/perl: empty[root@game ~]# echo $PATH; type perl; which perl; file $(which perl) /root/perl5/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin perl is hashed (/usr/local/bin/perl) /usr/local/bin/perl /usr/local/bin/perl: empty- Relajado