この本を見ながら、勉強。まずはSDK導入。
bash-3.2# gem install aws-sdk Fetching: jmespath-1.1.3.gem (100%) Successfully installed jmespath-1.1.3 Fetching: aws-sdk-core-2.2.13.gem (100%) Successfully installed aws-sdk-core-2.2.13 Fetching: aws-sdk-resources-2.2.13.gem (100%) Successfully installed aws-sdk-resources-2.2.13 Fetching: aws-sdk-2.2.13.gem (100%) Successfully installed aws-sdk-2.2.13 Parsing documentation for jmespath-1.1.3 Installing ri documentation for jmespath-1.1.3 Parsing documentation for aws-sdk-core-2.2.13 Installing ri documentation for aws-sdk-core-2.2.13 Parsing documentation for aws-sdk-resources-2.2.13 Installing ri documentation for aws-sdk-resources-2.2.13 Parsing documentation for aws-sdk-2.2.13 Installing ri documentation for aws-sdk-2.2.13 4 gems installed
pearってば何ですかね?
bash-3.2# pear config-set auto_discover 1 bash: pear: command not found
とりあえずインストール。
bash-3.2# homebrew install pear bash: homebrew: command not found
いつのまにかhomebrewも無くなっていた。MacOSバージョンアップ時に消えてたっぽい。
bash-3.2# curl -O http://pear.php.net/go-pear.phar % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 3482k 100 3482k 0 0 87829 0 0:00:40 0:00:40 --:--:-- 132k
一旦諦めたよ。おとなしくcurl先生発動。
php -d detect_unicode=0 go-pear.phar Below is a suggested file layout for your new PEAR installation. To change individual locations, type the number in front of the directory. Type 'all' to change all of them or simply press Enter to accept these locations. 1. Installation base ($prefix) : /usr 2. Temporary directory for processing : /tmp/pear/install 3. Temporary directory for downloads : /tmp/pear/install 4. Binaries directory : /usr/bin 5. PHP code directory ($php_dir) : /usr/share/pear 6. Documentation directory : /usr/docs 7. Data directory : /usr/data 8. User-modifiable configuration files directory : /usr/cfg 9. Public Web Files directory : /usr/www 10. System manual pages directory : /usr/man 11. Tests directory : /usr/tests 12. Name of configuration file : /private/etc/pear.conf 1-12, 'all' or Enter to continue: all Installation base ($prefix) [/usr] : Temporary directory for processing [/tmp/pear/install] : Temporary directory for downloads [/tmp/pear/install] : Binaries directory [$prefix/bin] : PHP code directory ($php_dir) [$prefix/share/pear] : Documentation directory [$prefix/docs] : Data directory [$prefix/data] : User-modifiable configuration files directory [$prefix/cfg] : Public Web Files directory [$prefix/www] : System manual pages directory [$prefix/man] : Tests directory [$prefix/tests] : Name of configuration file [/private/etc/pear.conf] : Below is a suggested file layout for your new PEAR installation. To change individual locations, type the number in front of the directory. Type 'all' to change all of them or simply press Enter to accept these locations. 1. Installation base ($prefix) : /usr 2. Temporary directory for processing : /tmp/pear/install 3. Temporary directory for downloads : /tmp/pear/install 4. Binaries directory : /usr/bin 5. PHP code directory ($php_dir) : /usr/share/pear 6. Documentation directory : /usr/docs 7. Data directory : /usr/data 8. User-modifiable configuration files directory : /usr/cfg 9. Public Web Files directory : /usr/www 10. System manual pages directory : /usr/man 11. Tests directory : /usr/tests 12. Name of configuration file : /private/etc/pear.conf 1-12, 'all' or Enter to continue: Unable to create PHP code directory ($php_dir) /usr/share/pear. Run this script as root or pick another location. bash-3.2# php -d detect_unicode=0 go-pear.phar Below is a suggested file layout for your new PEAR installation. To change individual locations, type the number in front of the directory. Type 'all' to change all of them or simply press Enter to accept these locations. 1. Installation base ($prefix) : /usr 2. Temporary directory for processing : /tmp/pear/install 3. Temporary directory for downloads : /tmp/pear/install 4. Binaries directory : /usr/bin 5. PHP code directory ($php_dir) : /usr/share/pear 6. Documentation directory : /usr/docs 7. Data directory : /usr/data 8. User-modifiable configuration files directory : /usr/cfg 9. Public Web Files directory : /usr/www 10. System manual pages directory : /usr/man 11. Tests directory : /usr/tests 12. Name of configuration file : /private/etc/pear.conf 1-12, 'all' or Enter to continue: Unable to create PHP code directory ($php_dir) /usr/share/pear. Run this script as root or pick another location.
El Capitanは/usr/sharetとかにディレクトリ作らせてくれないみたい。
http://stackoverflow.com/questions/33309005/sudo-mkdir-in-usr-operation-not-permitted-el-capitan
bash-3.2# php -d detect_unicode=0 go-pear.phar Below is a suggested file layout for your new PEAR installation. To change individual locations, type the number in front of the directory. Type 'all' to change all of them or simply press Enter to accept these locations. 1. Installation base ($prefix) : /usr 2. Temporary directory for processing : /tmp/pear/install 3. Temporary directory for downloads : /tmp/pear/install 4. Binaries directory : /usr/bin 5. PHP code directory ($php_dir) : /usr/share/pear 6. Documentation directory : /usr/docs 7. Data directory : /usr/data 8. User-modifiable configuration files directory : /usr/cfg 9. Public Web Files directory : /usr/www 10. System manual pages directory : /usr/man 11. Tests directory : /usr/tests 12. Name of configuration file : /private/etc/pear.conf 1-12, 'all' or Enter to continue: all Installation base ($prefix) [/usr] : /usr/local Temporary directory for processing [/tmp/pear/install] : Temporary directory for downloads [/tmp/pear/install] : Binaries directory [$prefix/bin] : PHP code directory ($php_dir) [$prefix/share/pear] : Documentation directory [$prefix/docs] : Data directory [$prefix/data] : User-modifiable configuration files directory [$prefix/cfg] : Public Web Files directory [$prefix/www] : System manual pages directory [$prefix/man] : Tests directory [$prefix/tests] : Name of configuration file [/private/etc/pear.conf] : Below is a suggested file layout for your new PEAR installation. To change individual locations, type the number in front of the directory. Type 'all' to change all of them or simply press Enter to accept these locations. 1. Installation base ($prefix) : /usr/local 2. Temporary directory for processing : /tmp/pear/install 3. Temporary directory for downloads : /tmp/pear/install 4. Binaries directory : /usr/local/bin 5. PHP code directory ($php_dir) : /usr/local/share/pear 6. Documentation directory : /usr/local/docs 7. Data directory : /usr/local/data 8. User-modifiable configuration files directory : /usr/local/cfg 9. Public Web Files directory : /usr/local/www 10. System manual pages directory : /usr/local/man 11. Tests directory : /usr/local/tests 12. Name of configuration file : /private/etc/pear.conf 1-12, 'all' or Enter to continue: Beginning install... Configuration written to /private/etc/pear.conf... Initialized registry... Preparing to install... installing phar:///Volumes/My Book Thunderbolt Duo/go-pear.phar/PEAR/go-pear-tarballs/Archive_Tar-1.4.0.tar... installing phar:///Volumes/My Book Thunderbolt Duo/go-pear.phar/PEAR/go-pear-tarballs/Console_Getopt-1.4.1.tar... installing phar:///Volumes/My Book Thunderbolt Duo/go-pear.phar/PEAR/go-pear-tarballs/PEAR-1.10.1.tar... installing phar:///Volumes/My Book Thunderbolt Duo/go-pear.phar/PEAR/go-pear-tarballs/Structures_Graph-1.1.1.tar... installing phar:///Volumes/My Book Thunderbolt Duo/go-pear.phar/PEAR/go-pear-tarballs/XML_Util-1.3.0.tar... install ok: channel://pear.php.net/Archive_Tar-1.4.0 install ok: channel://pear.php.net/Console_Getopt-1.4.1 install ok: channel://pear.php.net/Structures_Graph-1.1.1 install ok: channel://pear.php.net/XML_Util-1.3.0 install ok: channel://pear.php.net/PEAR-1.10.1 PEAR: Optional feature webinstaller available (PEAR's web-based installer) PEAR: Optional feature gtkinstaller available (PEAR's PHP-GTK-based installer) PEAR: Optional feature gtk2installer available (PEAR's PHP-GTK2-based installer) PEAR: To install optional features use "pear install pear/PEAR#featurename" ****************************************************************************** WARNING! The include_path defined in the currently used php.ini does not contain the PEAR PHP directory you just specified: </usr/local/share/pear> If the specified directory is also not in the include_path used by your scripts, you will have problems getting any PEAR packages working. Would you like to alter php.ini </etc/php.ini>? [Y/n] : Y php.ini </etc/php.ini> include_path updated. Current include path : .: Configured directory : /usr/local/share/pear Currently used php.ini (guess) : /etc/php.ini Press Enter to continue: The 'pear' command is now at your service at /usr/local/bin/pear ** The 'pear' command is not currently in your PATH, so you need to ** use '/usr/local/bin/pear' until you have added ** '/usr/local/bin' to your PATH environment variable. Run it without parameters to see the available actions, try 'pear list' to see what packages are installed, or 'pear help' for help. For more information about PEAR, see: http://pear.php.net/faq.php http://pear.php.net/manual/ Thanks for using go-pear! bash-3.2#
いろいろ出ているけど、/usr/localにしてインストール成功。