Skip to content
This repository has been archived by the owner on Feb 17, 2023. It is now read-only.

cf-sketch fails on CentOS 6.5 #431

Open
athompso opened this issue Feb 3, 2014 · 2 comments
Open

cf-sketch fails on CentOS 6.5 #431

athompso opened this issue Feb 3, 2014 · 2 comments

Comments

@athompso
Copy link

athompso commented Feb 3, 2014

[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:

  1. I cloned the gtithub repo on a machine with internet access
  2. copied the entire repo over to the cfengine hub (scp -r dmzhost:design_center design_center)
  3. On the cfengine hub: cd design_center/tools/cf-sketch
  4. make install
  5. cd ~
  6. cf-sketch
  7. 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.

@athompso
Copy link
Author

athompso commented Feb 3, 2014

I guess I should mention that I'm seeing this behaviour as of commit 369413a.
I haven't tested anything older yet.

@tzz
Copy link
Contributor

tzz commented Feb 3, 2014

I've fixed it with 29db619, I think. Could you check?

tzz pushed a commit to tzz/design-center that referenced this issue Jun 1, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants