6

我已经在 mac 中安装了 Thrift。

从终端看来,thrift 已成功安装,但是当我尝试运行 thrift 命令时,我得到以下信息

Thrift: command not found

我使用终端中的 whereis 命令查找 thrift 的位置,但找不到。

有什么建议么?

安装 thrift thrift 0.9.0 后的终端输出

Building C++ Library ......... : yes
Building C (GLib) Library .... : no
Building Java Library ........ : yes
Building C# Library .......... : no
Building Python Library ...... : yes
Building Ruby Library ........ : yes
Building Haskell Library ..... : no
Building Perl Library ........ : yes
Building PHP Library ......... : yes
Building Erlang Library ...... : no
Building Go Library .......... : no
Building D Library ........... : no
4

3 回答 3

4

我认为您实际上并没有安装节俭。您必须在 ./configure 之后执行以下操作


$ make
$ sudo make install
于 2013-04-12T05:33:37.873 回答
0

遇到同样的问题并尝试执行

    $ make
    $ sudo make install

命令但出现错误

./src/thrift/cxxfunctional.h:93:18: error: no member named 'bind' in namespace 'std'
using ::std::bind;
~~~~~~~^
src/thrift/concurrency/ThreadManager.cpp:569:8: warning: private field 'firstTime_' is not used [-Wunused-private-field]
bool firstTime_;
^
1 warning and 1 error generated.
make[4]: *** [ThreadManager.lo] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

之后发现问题https://issues.apache.org/jira/browse/THRIFT-2229

并尝试按照thrift说明http://thrift.apache.org/docs/BuildingFromSource/从源安装,现在一切都很好。

也许这些步骤会对您有所帮助。

于 2014-02-15T17:26:54.107 回答
0

我和你遇到了同样的问题。

但我通过使用 HomeBrew 安装它来修复它。

您可以尝试使用以下链接:

http://blog.evernote.com/tech/2012/12/20/building-apache-thrift-on-mac-os-x/ http://brew.sh

于 2014-06-06T16:17:18.220 回答