When trying to create a DMG on macOS 10.12, I get the following error:
Creating DMG
Error: Exit code: 2. Command failed: perl /Users/saghul/work/ag-projects/blink-webrtc/node_modules/electron-builder/templates/dmg/dmgProperties.pl
Can't locate Mac/Memory.pm in @INC (you may need to install the Mac::Memory module) (@INC contains: /usr/local/Cellar/pa7fecfb32c2ee0696612071b166858c0f348570001ed9839b24b1a597249e4c1 (sha256 hash) /usr/local/Cellar/perl/5.24.0_1/lib/perl5/site_perl/5.24.0 /usr/local/Cellar/perl/5.24.0_1/lib/perl5/5.24.0/darwin-thread-multi-2level /usr/local/Cellar/perl/5.24.0_1/lib/perl5/5.24.0 /usr/local/lib/perl5/site_perl/5.24.0 .) at /Users/saghul/work/ag-projects/blink-webrtc/node_modules/electron-builder/templates/dmg/dmgProperties.pl line 4.
BEGIN failed--compilation aborted at /Users/saghul/work/ag-projects/blink-webrtc/node_modules/electron-builder/templates/dmg/dmgProperties.pl line 4.
Can't locate Mac/Memory.pm in @INC (you may need to install the Mac::Memory module) (@INC contains: /usr/local/Cellar/perl/5.24.0_1/lib/perl5/site_perl/5.24.0/darwin-thread-multi-2level /usr/local/Cellar/perl/5.24.0_1/lib/perl5/site_perl/5.24.0 /usr/local/Cellar/perl/5.24.0_1/lib/perl5/5.24.0/darwin-thread-multi-2level /usr/local/Cellar/perl/5.24.0_1/lib/perl5/5.24.0 /usr/local/lib/perl5/site_perl/5.24.0 .) at /Users/saghul/work/ag-projects/blink-webrtc/node_modules/electron-builder/templates/dmg/dmgProperties.pl line 4.
BEGIN failed--compilation aborted at /Users/saghul/work/ag-projects/blink-webrtc/node_modules/electron-builder/templates/dmg/dmgProperties.pl line 4.
Last I tried on 10.11 this wasn't a problem. Thoughts?
I had the same error with perl installed via homebrew because the Mac::Memory module was missing. The default perl version provided by apple worked for me.
I'm on 10.11 and am running into the same issue.
Also, I am using the default perl version v5.24.0
which perl?
▶ which perl
/usr/local/bin/perl
Also,
▶ cpan Mac::Memory
Loading internal null logger. Install Log::Log4perl for logging messages
Reading '/Users/bschmeisser/.cpan/Metadata'
Database was generated on Tue, 11 Oct 2016 15:29:02 GMT
Running install for module 'Mac::Memory'
Checksum for /Users/bschmeisser/.cpan/sources/authors/id/C/CN/CNANDOR/Mac-Carbon-0.82.tar.gz ok
'YAML' not installed, will not store persistent state
Configuring C/CN/CNANDOR/Mac-Carbon-0.82.tar.gz with Makefile.PL
*** 64-BIT WARNING *** *** 64-BIT WARNING *** *** 64-BIT WARNING ***
Mac-Carbon does not run under 64-bit perl, and it appears you're running
a 64-bit perl. We can try to compile anyway, in case this is a fat binary;
we'll try to leave out the 64-bit compilation.
My guess is that you're running a 64-bit, non-fat, perl and that there's no
real chance this will work. If you want to try anyway, run:
perl Makefile.PL TRY_ANYWAY=1
Exiting.
No 'Makefile' created CNANDOR/Mac-Carbon-0.82.tar.gz
/usr/local/Cellar/perl/5.24.0_1/bin/perl Makefile.PL -- NOT OK
I can reproduce this error.
The workaround for me was:
brew remove perl so the default perl would be used. Though this broke my vim installation from homebrew.
@blainesch Thanks, so, " I am using the default perl " is not true — you use perl from brew.
I will fix issue soon (CET morning).
Please try 7.12.2.
Works for me. Thank you!
Sorry, folks, I was on a plane :-) Thanks for fixing it so quick! ❤️
Most helpful comment
Sorry, folks, I was on a plane :-) Thanks for fixing it so quick! ❤️