29

繰り返しになりますが、私は最初の OS X 10.10 ベータ版を実行しており、Homebrew で MongoDB を再インストールしようとしています。

を実行$ brew install mongodbした後の出力は次のとおりです。

==> Downloading http://downloads.mongodb.org/src/mongodb-src-r2.6.1.tar.gz
==> /usr/local/opt/scons/bin/scons install --prefix=/usr/local/Cellar/mongodb/2.6.1 -j8 --cc=/usr/bin/clang --cxx=/usr/bin/clang++ --osx-version-min=10.10 --full --64
scons: Reading SConscript files ...
Mkdir(".scons/Darwin/nohost")
usage: scons [OPTION] [TARGET] ...

SCons Error: option --osx-version-min: invalid choice: '10.10' (choose from '10.6', '10.7', '10.8', '10.9')

10.10 はまだ公開されていないため、明らかにインストール パッケージは 10.10 用に構成されていません。

ビルド プロセス中にこれを手動でバイパスする方法はありますか?

4

4 に答える 4

88

これはおそらく、MongoDB の新しいバージョン ( https://jira.mongodb.org/browse/SERVER-14204 ) で修正される予定です。今のところ、式にパッチを当てるだけです。

brew edit mongodb

次のようなブロックを見つけます。

args = %W[
  --prefix=#{prefix}
  -j#{ENV.make_jobs}
  --cc=#{ENV.cc}
  --cxx=#{ENV.cxx}
  --osx-version-min=#{MacOS.version}
]

次のように、OS X の最小バージョンを 10.9 に変更します。

args = %W[
  --prefix=#{prefix}
  -j#{ENV.make_jobs}
  --cc=#{ENV.cc}
  --cxx=#{ENV.cxx}
  --osx-version-min=10.9
]

編集: DP3、DP4、PB1 の追加手順

引き続きファイル内で、次の 3 行を のすぐ上に追加しますdef install

  def patches
    { :p1 => 'https://gist.githubusercontent.com/LinusU/a1771562fec0201c54cd/raw/98825f9fbe93b8cc524e05a9c0e99864e8301731/mongodb.diff' }
  end

そして、アップグレードを実行します。

brew upgrade mongodb
于 2014-06-13T13:41:15.303 に答える
4

言及しておきますが、この問題は修正されました。
本日 (2014 年 10 月 13 日) にビルドおよびインストールされました。$ brew install mongodb

==> Summary
  /usr/local/Cellar/mongodb/2.6.5: 17 files, 331M, built in 21.6 minutes
于 2014-10-13T20:58:34.667 に答える
3

Linus が説明した手順では不十分な場合は、追加の手順 (10.10 ベータ 3 およびベータ 4) を実行します。

  1. cd /ライブラリ/キャッシュ/自作/
  2. tar xvfz mongodb-2.6.3.tar.gz
  3. CD mongodb-src-r2.6.3
  4. vi src/third_party/s2/util/endian/endian.h
  5. 181 ~ 189 行のコメントを外します

    // This one is safe to take as it's an extension
    //#define htonll(x) ghtonll(x)
    //
    // ntoh* and hton* are the same thing for any size and bytesex,
    // since the function is an involution, i.e., its own inverse.
    //#define gntohl(x) ghtonl(x)
    //#define gntohs(x) ghtons(x)
    //#define gntohll(x) ghtonll(x)
    //#define ntohll(x) htonll(x)
    
  6. CD ..
  7. rm mongodb-2.6.3.tar.gz
  8. tar cvfz mongodb-2.6.3.tar.gz mongodb-src-r2.6.3
  9. 醸造インストールmongodb

    ==> Downloading http://downloads.mongodb.org/src/mongodb-src-r2.6.3.tar.gz
    Already downloaded: /Library/Caches/Homebrew/mongodb-2.6.3.tar.gz
    Error: SHA1 mismatch
    Expected: 226ab45e3a2e4d4a749271f1bce393ea8358d3dd
    Actual: 593bbe9cb7e0b1d2368b3b6487893e8ba459acfb
    Archive: /Library/Caches/Homebrew/mongodb-2.6.3.tar.gz
    
  10. 実際のSHA1をコピーします
  11. 醸造編集mongodb
  12. 予想される SHA1 値を実際の値に置き換えます。
  13. 醸造インストールmongodb
  14. rm -rf mongodb-src-r2.6.3
于 2014-07-22T10:37:59.080 に答える
1

パッチが提案されているようです。しかし、私は本当に情報を持っていません - https://groups.google.com/forum/#!topic/mongodb-user/KToczUct6BE

私もそれが機能するのを見たいです。

于 2014-06-05T06:47:27.343 に答える