This repository was archived by the owner on Feb 17, 2023. It is now read-only.

Description
[root@mnt03 ~]# cf-sketch
Can't locate DCAPI.pm in @inc (@inc contains: /usr/local/bin/perl-lib /usr/local/bin/perl-lib/File-Path-2.09 /usr/local/bin/perl-lib/File-Which-1.09/lib /usr/local/bin/perl-lib/JSON-2.53/lib /usr/local/bin/perl-lib/Mo-0.31/lib /usr/local/bin/../lib/cf-sketch /usr/local/bin/../lib/cf-sketch/File-Path-2.09 /usr/local/bin/../lib/cf-sketch/File-Which-1.09/lib /usr/local/bin/../lib/cf-sketch/JSON-2.53/lib /usr/local/bin/../lib/cf-sketch/Mo-0.31/lib /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 /usr/local/bin/cf-sketch line 43.
BEGIN failed--compilation aborted at /usr/local/bin/cf-sketch line 43.
Steps to get here:
- I cloned the gtithub repo on a machine with internet access
- copied the entire repo over to the cfengine hub (scp -r dmzhost:design_center design_center)
- On the cfengine hub: cd design_center/tools/cf-sketch
- make install
- cd ~
- cf-sketch
- observe this error.
I note that the lib path "/usr/local/bin/../lib/cf-sketch" is present, but the subdirectory "perl-lib" is not.
The simple fix appears to be modify line 39 to read:
("$FindBin::Bin/perl-lib", "$FindBin::Bin/../lib/cf-sketch", "$FindBin::Bin/../lib/cf-sketch/perl-lib");
i.e. add a 3rd element to the map'd LIST that includes the correct path.