The Problem Tried to install the latest version of cpan and got stuck. Tracked it down to the dependency module Mac::SystemDirectory which was failing to build:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
cpan[1]>install Mac::SystemDirectory
Reading'/var/root/.cpan/Metadata'
Database was generated on Sun,09Jun201907:17:02GMT
Running install formodule'Mac::SystemDirectory'
Running make forE/ET/ETHER/Mac-SystemDirectory-0.10.tar.gz
Couldn't execute cc -g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing -fstack-protector -Os "-I/System/Library/Perl/5.18/darwin-thread-multi-2level/CORE" -c HASCOMPILEREZFt/TESTUSSI.c -o HASCOMPILEREZFt/TESTUSSI.o: Inappropriate ioctl for device at Makefile.PL line 14.
Requires a compiler
Warning: No success on command[/usr/bin/perl Makefile.PL INC=-I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Perl/5.18/darwin-thread-multi-2level/CORE]
ETHER/Mac-SystemDirectory-0.10.tar.gz
/usr/bin/perl Makefile.PL INC=-I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Perl/5.18/darwin-thread-multi-2level/CORE -- NOT OK
Running make test
Make had some problems, won'ttest
Running make install
Make had some problems,won't install
Failed during this command:
ETHER/Mac-SystemDirectory-0.10.tar.gz : writemakefile NO '/usr/bin/perl Makefile.PL INC=-I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Perl/5.18/darwin-thread-multi-2level/CORE'returned status6400
The Solution Use the MacOS installer command to deploy the needed files:
The key is to send a response header like this: Access-Control-Allow-Origin: * In the Apache web server, one enables this via the following directive: Header set Access-Control-Allow-Origin * This requires the use of mod_headers, which is enabled by default in Apache. For example: