issue with dx_provision_vdb.pl

  • 0
  • 1
  • Question
  • Updated 3 months ago
  • Answered

hi - I downloaded the new dxtoolkit master zip file. from that path I am trying to run dx_provision_vdb.pl to create a vdb. But I am getting the following error

./dx_provision_vdb.pl[25]: use: not found [No such file or directory]
./dx_provision_vdb.pl[26]: use: not found [No such file or directory]
./dx_provision_vdb.pl[27]: use: not found [No such file or directory]
./dx_provision_vdb.pl: line 27: syntax error at line 28: `(' unexpected


Photo of Srividya Srinivasan

Srividya Srinivasan

  • 304 Points 250 badge 2x thumb

Posted 3 months ago

  • 0
  • 1
Photo of Gary Hallam

Gary Hallam, Official Rep

  • 1,584 Points 1k badge 2x thumb
Is Perl installed and is the file executable by your user?
I guess you tried the obvious ./ dx_provision_vdb.pl or sudo perl dx_provision_vdb.pl ?
What does perl -v show?
Photo of Srividya Srinivasan

Srividya Srinivasan

  • 304 Points 250 badge 2x thumb

Thanks for the response Gary. Yes I tried the dx_provision_vdb.pl but it errored out.

perl -v show gives this

 perl -v show

This is perl, v5.10.1 (*) built for x86_64-linux-thread-multi

Copyright 1987-2009, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl".  If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.

Photo of fMarcin Przepiorowski

fMarcin Przepiorowski, Employee

  • 400 Points 250 badge 2x thumb
I would test first this syntax

perl dx_provision_vdb.pl -help

If you need a compiled version of dxtoolkit, please check a release tab in github.

regards,
Marcin
Photo of Srividya Srinivasan

Srividya Srinivasan

  • 304 Points 250 badge 2x thumb
Thanks for the response
Photo of Srividya Srinivasan

Srividya Srinivasan

  • 304 Points 250 badge 2x thumb

This is what I get

perl dx_provision_vdb.pl -help
Can't locate JSON.pm 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 .) at dx_provision_vdb.pl line 27.
BEGIN failed--compilation aborted at dx_provision_vdb.pl line 27.

Photo of Gary Hallam

Gary Hallam, Official Rep

  • 1,584 Points 1k badge 2x thumb
So Srividya,
I have no idea what platform you are trying to run this on as you do not state in your note.  However my guess is that you're new to this (like me) and therefore you've made the mistake that others make, which is to download the source version of the dxtoolkit (I'm looking at you Rahim!).  This means that to run it you're going to need perl installed and you're going to have to ensure that your perl scripts are able to find the perl libraries and that you have the right included components like JSON.pm etc.  It looks like you can find the perl libraries but that they're missing the JSON stuff.  So you would need to install JSON and how you do that will depend on the platform you're using.  On a Mac you'd do something like type 'brew install cpan' without the quotes and then 'cpanm install JSON' without the quotes, but then you're likely to run into version errors with running Homebrew... assuming you're on a Mac.  But really you should use the compiled dxtoolkit as Marcin infers and as described below.

The easiest way to solve your pain is to download the compiled version of the dxtoolkit for your platform.  Do that here.  You'll want this one if you're on linux/mac: dxtoolkit2-2.3.5-rc1-redhat6.tar.gz and this one if you're on windows: dxtoolkit2-2.3.5-rc1-win64.zip

That will give you an executable set of commands that you can run from your laptop and you should be golden.  Then you can just run the executable called "dx_provision_vdb" rather than a perl script.

I hope that helps!  I will ask Marcin (again) to please put a note in his dxtoolkit readme for us dummies... ;-)

Regards,
Gary
Photo of Gary Hallam

Gary Hallam, Official Rep

  • 1,584 Points 1k badge 2x thumb
PS. To get the perl scripts working on my Mac I needed to install cpan:
brew install cpan
Then re-install ruby:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"&nbsp;<br>Then install JSON.pm:  sudo cpanm install JSON
Then install Date/Manip.pm: sudo cpanm install Date/Manip.pm
Then install Crypt/CBC.pm: sudo cpanm install Crypt/CBC.pm
(Edited)
Photo of Mouhssine SAIDI

Mouhssine SAIDI

  • 4,612 Points 4k badge 2x thumb
Hi Srividay,

Obviously you didn’t follow the prerequisites as stated per dxtoolkit documentation on readme page section prerequisites.

You have two options :

Set the following prerequisites (upgrade Perl to at least 5.16 and install the required modules)

Source version

Perl version 5.16 or higher

Required packages

JSON
Date::Manip
DateTime::Event::Cron::Quartz
DateTime::Format::DateParse
Crypt::CBC
Crypt::Blowfish
Text::CSV
Try::Tiny
LWP::UserAgent
Net::SSLeay
IO::Socket::SSL
LWP::Protocol::https
Term::ReadKey
Log::Syslog::Fast

Or

Use compiled version as Marcin states and this requires no change on your system.

Regards,

Mouhssine
Photo of Srividya Srinivasan

Srividya Srinivasan

  • 304 Points 250 badge 2x thumb
Yes Gary I did download the source version instead of the compiled version. let me download the compiled version like you suggested. Thanks a lot. The platform I am using is Linux server
Photo of Srividya Srinivasan

Srividya Srinivasan

  • 304 Points 250 badge 2x thumb
Thank you Mouhssine. I am going to try to get the compiled version
Photo of Gary Hallam

Gary Hallam, Official Rep

  • 1,584 Points 1k badge 2x thumb
Good man Srividya - let us know how you get on!  Marcin has done some fantastic work putting that toolkit together... you should be in DevOps heaven once you get the hang of it... or is that DataOps?! :-)