• Home »
  • »
  • scanpbnj: install_driver(CSV) failed: Can’t locate DBD/CSV.pm in @INC

scanpbnj: install_driver(CSV) failed: Can’t locate DBD/CSV.pm in @INC

While playing around with pbnj or scanpbnj on Backtrack just a little bit ago I received an error when attempting to have scanpbnj output results to a CSV file. The error received is easily resolved by installing a single package on Backtrack. Below the error is described in more detail along with details about how to install the package that resolves the error message.

DBD/CSV Error Received When Outputting scanpbnj Results To A CSV File:


  1. install_driver(CSV) failed: Can't locate DBD/CSV.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at (eval 79) line 3.
  2. Perhaps the DBD::CSV perl module hasn't been fully installed,
  3. or perhaps the capitalisation of 'CSV' isn't right.
  4. Available drivers: DBM, ExampleP, File, Gofer, Proxy, SQLite, Sponge, mysql.
  5.  at /usr/local/bin/scanpbnj line 1900

The above error was output after modifying the /root/.pbnj-2.0/config.yaml file with “db: CSV” and “database: pbnjresults.csv” and then running “scanpbnj -i pbnjlist -p –dir pbnjdir/” from a Backtrack Terminal window. Luckily this is easy to resolve by installing the libdbd-csv-perl package in Backtrack as shown in the below example.

Install libdbd-csv-perl Using apt-get On Backtrack:


  1. root@bt:~# apt-get install libdbd-csv-perl
  2. Reading package lists... Done
  3. Building dependency tree
  4. Reading state information... Done
  5. The following packages were automatically installed and are no longer required:
  6. libdmraid1.0.0.rc16 python-pyicu libdebian-installer4 cryptsetup libecryptfs0 reiserfsprogs rdate bogl-bterm
  7. ecryptfs-utils libdebconfclient0 dmraid
  8. Use 'apt-get autoremove' to remove them.
  9. The following extra packages will be installed:
  10. libclone-perl libsql-statement-perl
  11. The following NEW packages will be installed:
  12. libclone-perl libdbd-csv-perl libsql-statement-perl
  13. 0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
  14. Need to get 199kB of archives.
  15. After this operation, 741kB of additional disk space will be used.
  16. Do you want to continue [Y/n]? Y
  17. Get:1 http://32.repository.backtrack-linux.org/ revolution/main libclone-perl 0.31-1build1 [14.3kB]
  18. Get:2 http://all.repository.backtrack-linux.org/ revolution/main libsql-statement-perl 1.23-1 [154kB]
  19. Get:3 http://all.repository.backtrack-linux.org/ revolution/main libdbd-csv-perl 0.2600-1 [31.0kB]
  20. Fetched 199kB in 0s (298kB/s)
  21. Selecting previously deselected package libclone-perl.
  22. (Reading database ... 237523 files and directories currently installed.)
  23. Unpacking libclone-perl (from .../libclone-perl_0.31-1build1_i386.deb) ...
  24. Selecting previously deselected package libsql-statement-perl.
  25. Unpacking libsql-statement-perl (from .../libsql-statement-perl_1.23-1_all.deb) ...
  26. Selecting previously deselected package libdbd-csv-perl.
  27. Unpacking libdbd-csv-perl (from .../libdbd-csv-perl_0.2600-1_all.deb) ...
  28. Processing triggers for man-db ...
  29. Setting up libclone-perl (0.31-1build1) ...
  30. Setting up libsql-statement-perl (1.23-1) ...
  31. Setting up libdbd-csv-perl (0.2600-1) ...
  32. root@bt:~#

After installing libdbd-csv-perl I was able to run the same command and the results were output properly to CSV files named machine and services in the directory specified in the command. I will be writing a mini pbnj howto in the near future.

BackTrack 4: Assuring Security by Penetration Testing (Paperback)

List Price: $49.99 USD
New From: $29.85 USD In Stock
Used from: $1.07 USD In Stock

Mastering Regular Expressions (Paperback)

List Price: $49.99 USD
New From: $24.58 USD In Stock
Used from: $14.91 USD In Stock