如何在 Solaris 11 上安装 hiredis?

How do I install hiredis on Solaris 11?

我正在尝试在我的 Joyent SmartMachine 运行 Solaris 11 上安装 hiredis。我不断收到以下错误。

In file included from /usr/include/iso/string_iso.h:48:0,

             from /opt/local/gcc47/lib/gcc/x86_64-sun-solaris2.11/4.7.3/include-fixed/string.h:41,

             from vendor/hiredis/read.c:34:

/opt/local/gcc47/lib/gcc/x86_64-sun-solaris2.11/4.7.3/include-fixed/sys/feature_tests.h:366:2: error: #error "Compiler or options invalid; UNIX 03 and POSIX.1-2001 applications        require the use of c99"

error: command 'gcc' failed with exit status 1

----------------------------------------
Cleaning up...

您需要在执行 pip 安装时手动覆盖 C 编译器。尝试以下命令:

CC="gcc -std=gnu99" pip install hiredis