Installing rrdtool perl module on local perl: no write permission to local folder?


(Lieven Hollevoet) #1

Hello,

I’m trying to install RRDtool + Perl bindings to a Perl version that I installed using Perlbrew on OSX 10.10.5. I’m using the latest brew and ‘brew doctor’ tells me all is fine.

Installing RRDtool itself works fine, however, the installer fails to put the perl module in the correct Perl module folder, telling me it has no write access to that folder.

Installing RRDtool with the Perl bindings for a locally installed Perl used to work by passing the option --env=std when doing the install. See https://github.com/Homebrew/legacy-homebrew/issues/12090 for more info.

But with the latest version of brew, the installer commands that should copy the module to the correct folder fails with the following error:

Appending installation info to /Users/lieven/perl5/perlbrew/perls/perl-5.24.0/lib/5.24.0/darwin-2level/perllocal.pod
/bin/sh: /Users/lieven/perl5/perlbrew/perls/perl-5.24.0/lib/5.24.0/darwin-2level/perllocal.pod: Operation not permitted
make[4]: [doc_site_install] Error 1 (ignored)
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ERROR: Can't create '/Users/lieven/perl5/perlbrew/perls/perl-5.24.0/lib/site_perl/5.24.0' 
Do not have write permissions on '/Users/lieven/perl5/perlbrew/perls/perl-5.24.0/lib/site_perl/5.24.0'
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 at -e line 1.
make[4]: *** [pure_site_install] Error 1

Which is weird because this is a folder that I own.
I already tried to give write access to group and world on that folder but this does not solve the problem.

Is there something changed in the way brew works so that it cannot longer write to folders under the home folder of a user?

Is there a way to find back the folder where the files are built by brew so that I can try to copy them to the correct location myself?

Thanks,
Lieven.


(Mike McQuaid) #2

Is there something changed in the way brew works so that it cannot longer write to folders under the home folder of a user?

Yes, the macOS sandbox prevents this during installation now. Note that Perlbrew is unsupported by Homerbew so you’re best to figure this out with them.


(Lieven Hollevoet) #3

Hello @MikeMcQuaid,

thanks for the feedback! Clear and understood.

Just to understand how I can proceed further:

is there a way to access the build results after I do

brew install --build-from-source rrdtool

Because I see that the module is built correctly in the logs, I just cannot access the ‘built’ folder because I don’t know where it is located. So I can’t test it out by copying the files myself. There is in the beginning of the log a mentioning of a folder in /tmp/ but I don’t find that folder back after the build process completes (which probably makes sense as it is only a temporary folder, but it would be nice if there would be a way to retrieve the files before they are deleted).

Sorry if this is a basic question, but if I know where to find the files I can test them out and then take it further up with the people working on Perlbrew.

Thanks,
Lieven.


(Mike McQuaid) #4

Try brew install --build-from-source --keep-tmp rrdtool. In generally, I recommend checking out brew install --help or man brew which details such things.


(Lieven Hollevoet) #5

Hello @MikeMcQuaid,

you’re right, this is documented in the brew install --help output. I looked over that. My bad!

For reference for others, the way I currently install the shared perl bindings on OS X using brew is:

brew install --env=std --build-from-source --keep-tmp rrdtool

Then navigate to the temp folder where the build results are retained, this is listed in the output of the previous command.

Go into the subfolder bindings/perl-shared and do make install there.

I’ll post a link to this discussion for the Perlbrew developers so that they are aware of this.

Mike: thanks again for the help and your time,
Lieven.


(Mike McQuaid) #6

No worries, just figured it might help for future. Glad to help.