簡體   English   中英

嘗試安裝pylibmc時生成錯誤

[英]Build errors when trying to install pylibmc

剛有了一台新的筆記本電腦,從頭開始設置了我的開發環境,但我收到了這個奇怪的錯誤,它似乎不是缺少依賴項的結果(盡管我可能錯了)。 我正在使用Python 2.7.3在virtualenv中工作。 Libevent,libmemcached和memcached都已與Homebrew一起安裝。

(grlli)Tylers-MacBook-Pro:grlli tyler$ pip install pylibmc
Downloading/unpacking pylibmc
  Running setup.py egg_info for package pylibmc

Installing collected packages: pylibmc
  Running setup.py install for pylibmc
    building '_pylibmc' extension
    cc -fno-strict-aliasing -fno-common -dynamic -arch i386 -arch x86_64 -I/usr/local/include -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -DUSE_ZLIB -I/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _pylibmcmodule.c -o build/temp.macosx-10.8-intel-2.7/_pylibmcmodule.o -fno-strict-aliasing
    _pylibmcmodule.c:1895:33: error: member reference base type 'const void' is not a structure or union
                               svr->hostname, svr->port);
                               ~~~~~^~~~~~~~~~~~~~~~~~~~
    /usr/include/secure/_stdio.h:56:62: note: expanded from macro 'snprintf'
      __builtin___snprintf_chk (str, len, 0, __darwin_obsz(str), __VA_ARGS__)
                                                                 ^
    1 error generated.
    error: command 'cc' failed with exit status 1
    Complete output from command /Users/tyler/projects/envs/grlli/bin/python -c "import setuptools;__file__='/Users/tyler/projects/envs/grlli/build/pylibmc/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/1_/jkd0_x495gs0g8v7z2pgz3bc0000gn/T/pip-E_pLFk-record/install-record.txt --single-version-externally-managed --install-headers /Users/tyler/projects/envs/grlli/bin/../include/site/python2.7:
    running install

running build

running build_py

running build_ext

building '_pylibmc' extension

cc -fno-strict-aliasing -fno-common -dynamic -arch i386 -arch x86_64 -I/usr/local/include -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -DUSE_ZLIB -I/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _pylibmcmodule.c -o build/temp.macosx-10.8-intel-2.7/_pylibmcmodule.o -fno-strict-aliasing

_pylibmcmodule.c:1895:33: error: member reference base type 'const void' is not a structure or union

                           svr->hostname, svr->port);

                           ~~~~~^~~~~~~~~~~~~~~~~~~~

/usr/include/secure/_stdio.h:56:62: note: expanded from macro 'snprintf'

  __builtin___snprintf_chk (str, len, 0, __darwin_obsz(str), __VA_ARGS__)

                                                             ^



1 error generated.

error: command 'cc' failed with exit status 1

----------------------------------------
Command /Users/tyler/projects/envs/grlli/bin/python -c "import setuptools;__file__='/Users/tyler/projects/envs/grlli/build/pylibmc/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/1_/jkd0_x495gs0g8v7z2pgz3bc0000gn/T/pip-E_pLFk-record/install-record.txt --single-version-externally-managed --install-headers /Users/tyler/projects/envs/grlli/bin/../include/site/python2.7 failed with error code 1 in /Users/tyler/projects/envs/grlli/build/pylibmc
Storing complete log in /Users/tyler/.pip/pip.log

任何幫助是極大的贊賞!

我遇到了同樣的問題。 對我來說固定的一件事是將setuptools更新到最新版本。

pip install setuptools --upgrade

嘗試安裝pylibmc 1.2.3,它對我有幫助。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM