Can't locate in @INC (@INC contains

Issues related to applications and software problems
Post Reply
Posts: 14
Joined: 2019/10/09 20:46:11

Can't locate in @INC (@INC contains

Post by Iqbal » 2021/02/19 18:35:17


I have installed mysql and perl-DBD-MySQL. As you can see here the terminal output:

[root@adeq scripts_db]# yum -y install perl-DBD-MySQL
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base:
* centos-sclo-rh:
* centos-sclo-sclo:
* epel:
* extras:
* nux-dextop:
* updates:
Package perl-DBD-MySQL-4.023-6.el7.x86_64 already installed and latest version
Nothing to do
[root@adeq scripts_db]# mysql -u ametsecure -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 45
Server version: 8.0.23 MySQL Community Server - GPL

Copyright (c) 2000, 2021, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> \q
[root@adeq scripts_db]# which mysql

But when I ran a script it is giving me this error: Can't locate in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .)

Please help

Posts: 221
Joined: 2020/01/17 09:01:44

Re: Can't locate in @INC (@INC contains

Post by sml » 2021/02/19 19:08:37

Because it is

Code: Select all

$ rpm -ql perl-DBD-MySQL|fgrep /

Posts: 1171
Joined: 2013/09/06 03:12:10

Re: Can't locate in @INC (@INC contains

Post by Whoever » 2021/02/20 06:25:34

You don't need "use Mysql", all you need is:

use DBI;

Post Reply

Return to “CentOS 7 - Software Support”