2015-02-03 2 views
2

Я пытаюсь установить ibm_db в свой Ubuntu 14.04 (у меня был этот пакет раньше, но мне пришлось отформатировать мой компьютер). Когда:ibm_db не может быть установлен в Ubuntu 14.04

pip install ibm_db 

Я получаю эту ошибку, глядя на "хвост -n100 /home/nfs/user/.pip/pip.log"

copying tests/test_220_PersistentConn.py -> build/lib.linux-x86_64-2.7/tests 

copying tests/test_150_FetchAssocSelect_01.py -> build/lib.linux-x86_64-2.7/tests 

copying tests/test_041_FetchTupleMany_01.py -> build/lib.linux-x86_64-2.7/tests 

copying tests/test_060_Tables_01.py -> build/lib.linux-x86_64-2.7/tests 

copying tests/test_120_FieldName.py -> build/lib.linux-x86_64-2.7/tests 

copying tests/test_091_ConnmsgWrongUser.py -> build/lib.linux-x86_64-2.7/tests 

copying tests/test_200_MultipleRsltsetsUniformColDefs.py -> build/lib.linux-x86_64-2.7/tests 

copying tests/test_024_ForeignKeys.py -> build/lib.linux-x86_64-2.7/tests 

copying tests/test_155_FetchAssocSelect_05.py -> build/lib.linux-x86_64-2.7/tests 

copying tests/test_154_AllFetches.py -> build/lib.linux-x86_64-2.7/tests 

copying tests/test_201_MultipleRsltsetsDiffColDefs.py -> build/lib.linux-x86_64-2.7/tests 

copying tests/test_003_NumAffectedRows.py -> build/lib.linux-x86_64-2.7/tests 

copying tests/test_createDropDB.py -> build/lib.linux-x86_64-2.7/tests 

copying tests/test_045_FetchTupleBinaryData_01.py -> build/lib.linux-x86_64-2.7/tests 

copying tests/test_260_FetchTupleMany_07.py -> build/lib.linux-x86_64-2.7/tests 

copying tests/test_recreateDB.py -> build/lib.linux-x86_64-2.7/tests 

copying tests/test_6561_InsertNULLValues.py -> build/lib.linux-x86_64-2.7/tests 

running egg_info 

creating ibm_db.egg-info 

writing ibm_db.egg-info/PKG-INFO 

writing top-level names to ibm_db.egg-info/top_level.txt 

writing dependency_links to ibm_db.egg-info/dependency_links.txt 

writing manifest file 'ibm_db.egg-info/SOURCES.txt' 

warning: manifest_maker: standard file '-c' not found 



reading manifest file 'ibm_db.egg-info/SOURCES.txt' 

reading manifest template 'MANIFEST.in' 

warning: no files found matching '*' under directory 'clidriver' 

warning: no files found matching '*' under directory 'ibm_db_dlls' 

writing manifest file 'ibm_db.egg-info/SOURCES.txt' 

copying tests/pic1.jpg -> build/lib.linux-x86_64-2.7/tests 

copying tests/spook.png -> build/lib.linux-x86_64-2.7/tests 

running build_ext 

building 'ibm_db' extension 

creating build/temp.linux-x86_64-2.7 

x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/home/nfs/ruben/Downloads/dsdriver/./include -I/usr/include/python2.7 -c ibm_db.c -o build/temp.linux-x86_64-2.7/ibm_db.o 

ibm_db.c:26:20: fatal error: Python.h: No such file or directory 

#include <Python.h> 

        ^

compilation terminated. 

error: command 'x86_64-linux-gnu-gcc' failed with exit status 1 

---------------------------------------- 
Cleaning up... 
    Removing temporary dir /tmp/pip_build_ruben... 
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip_build_ruben/ibm-db/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-RuRqdo-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_ruben/ibm-db 
Exception information: 
Traceback (most recent call last): 
    File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main 
    status = self.run(options, args) 
    File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 283, in run 
    requirement_set.install(install_options, global_options, root=options.root_path) 
    File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1435, in install 
    requirement.install(install_options, global_options, *args, **kwargs) 
    File "/usr/lib/python2.7/dist-packages/pip/req.py", line 706, in install 
    cwd=self.source_dir, filter_stdout=self._filter_install, show_stdout=False) 
    File "/usr/lib/python2.7/dist-packages/pip/util.py", line 697, in call_subprocess 
    % (command_desc, proc.returncode, cwd)) 
InstallationError: Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip_build_ruben/ibm-db/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-RuRqdo-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_ruben/ibm-db 

Что происходит с пакетом. Исправлена ​​ли исходная ссылка?

С уважением!

ответ

4

Насколько я понял, пакет python-dev пропущен на вашем компьютере. Попробуйте установить его и переустановить ibm_db. Для установки python-dev используйте следующую команду:

$ sudo apt-get install -y python-dev 
+0

Спасибо, это работает !!! – Ruben

+0

Установка ibm_db в виртуальном окружении по-прежнему показывает сообщение об ошибке: UnicodeDecodeError: кодек ascii не может декодировать байт 0xe2 в позиции 99: порядковый не в диапазоне (128) – Ruben

+0

, когда я делаю pip freeze, я получаю ibm-db == 2.0.5.1 внутри списка, но все еще возникают проблемы с его установкой в ​​виртуальном env – Ruben

Смежные вопросы