Skip to content
Advertisement

Arin Bulk whois data perl Can’t locate BulkWhois/Schema.pm in @INC

I have tried this on two operating systems (first on Fedora then on Ubuntu(recommended)) and I am still confused so I am reaching out to the community.

I have access to ARIN’s bulk whois data and want to parse the xml file and throw it into a database. I came across a Perl script that does exactly this in a github repo https://github.com/giovino/Arin-XML-Data-to-MySQL. This is done on Ubuntu and stored in a mysql database.

I followed all of the steps, 1.) Download the project, 2.) Untar, 3.) Install libraries, 4.) Install perl modules, 5.) Install mysql, start the mysql-server, and create the “BulkWhois” database as suggested.

When I run the command:

ubuntu@ubuntu:~$ ./McKizzle-Arin-XML-Data-to-MySQL-dc77a54/src/bulkwhois2database.pl --file ~/arin_db.xml --dbms mysql --database BulkWhois --host localhost --port 3306

I get this error message:

Can't locate BulkWhois/Schema.pm in @INC (you may need to install the BulkWhois::Schema module) (@INC contains: /etc/perl /usr/local/lib/perl/5.18.2 /usr/local/share/perl/5.18.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.18 /usr/share/perl/5.18 /usr/local/lib/site_perl .) at ./McKizzle-Arin-XML-Data-to-MySQL-dc77a54/src/bulkwhois2database.pl line 12.BEGIN failed--compilation aborted at ./McKizzle-Arin-XML-Data-to-MySQL-dc77a54/src/bulkwhois2database.pl line 12.

Line 12 in bulkwhois2database.pl:

use BulkWhois::Schema;

The error says Can't locate BulkWhois/Schema.pm in @INC. I know that in the directory above the one that bulkwhois2database.pl is in there is Schema.pm

ubuntu@ubuntu:~/McKizzle-Arin-XML-Data-to-MySQL-dc77a54/src/BulkWhois$ ls
Schema  Schema.pm

Do I need to move that somewhere? Maybe there is another issue?

Advertisement

Answer

With all of the help from Patrick, we solved the issue I was having.

Add the -I adds the current directory and made perl find the missing perl module.

Needed to install the missing Switch module:

sudo cpan -f Switch

Final command that worked:

cd ~/McKizzle-Arin-XML-Data-to-MySQL-dc77a54/src/ ; perl -I. bulkwhois2database.pl --file /tmp/arin_db.xml --dbms mysql --database BulkWhois --host localhost --port 3306 --user root 
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement