[?][PHP] php-build + brewでcomposerが入らない

備忘録でもないしなんでもないけど、
% brew install josegonzalez/php/composer

Error: No available formula for php53
Searching taps...
みたいな感じで、composerが入らない..
なんか、PHPがないんじゃね?みたいなこと言われる。




Formula確認してみる
% brew edit josegonzalez/php/composer
と、
require 'formula'
require File.expand_path("../../Requirements/php-meta-requirement", Pathname.new(__FILE__).realpath)
require File.expand_path("../../Requirements/composer-requirement", Pathname.new(__FILE__).realpath)

class Composer < Formula
  homepage 'http://getcomposer.org'
  url 'http://getcomposer.org/download/1.0.0-alpha8/composer.phar'
  sha1 '6eefa41101a2d1a424c3d231a1f202dfe6f09cf8'
  version '1.0.0-alpha8'

  depends_on PhpMetaRequirement
  depends_on ComposerRequirement

  def install

解決?

なんか、php-meta-requirementとかあるけど、php-buildでphpいれてるし、
requireされている、composer-requirement の、
COMMAND = 'curl -s http://getcomposer.org/installer | /usr/bin/env php
の部分も動くので、
require File.expand_path("../../Requirements/php-meta-requirement", Pathname.new(__FILE__).realpath)
depends_on PhpMetaRequirement
の部分をコメントアウト。

require 'formula'
#require File.expand_path("../../Requirements/php-meta-requirement", Pathname.new(__FILE__).realpath)
require File.expand_path("../../Requirements/composer-requirement", Pathname.new(__FILE__).realpath)

class Composer < Formula
  homepage 'http://getcomposer.org'
  url 'http://getcomposer.org/download/1.0.0-alpha8/composer.phar'
  sha1 '6eefa41101a2d1a424c3d231a1f202dfe6f09cf8'
  version '1.0.0-alpha8'

  #depends_on PhpMetaRequirement
  depends_on ComposerRequirement

  def install

% brew install josegonzalez/php/composer

==> Downloading http://getcomposer.org/download/1.0.0-alpha8/composer.phar
################################################################ 100.0%
==> Caveats
Verify your installation by running:
  "composer --version".

You can read more about composer and packagist by running:
  "brew home composer".
==> Summary
🍺 /usr/local/Cellar/composer/1.0.0-alpha8: 3 files, 952K, built in 7 seconds
なんか、後味悪いけど、解決っぽい。

コメント

このブログの人気の投稿

インターネット共有のための sysctl での設定に躓いた