Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ld: file not found: /usr/lib/system/libsystem_darwin.dylib for architecture x86_64 #24

Open
pddg opened this issue Mar 16, 2018 · 2 comments

Comments

@pddg
Copy link
Member

pddg commented Mar 16, 2018

環境

  • Python 3.6
  • macOS 10.12.6
  • Xcode 9.2 (9C40b)

発生したエラー

pip install student_portal_crawler
Collecting student_portal_crawler
  Downloading student_portal_crawler-0.1.0a1-py3-none-any.whl
Collecting lxml>=4.0.0 (from student_portal_crawler)
  Downloading lxml-4.2.0.tar.gz (4.3MB)
    100% |████████████████████████████████| 4.3MB 345kB/s
Collecting beautifulsoup4>=4.5.0 (from student_portal_crawler)
  Using cached beautifulsoup4-4.6.0-py3-none-any.whl
Collecting requests>=2.15.0 (from student_portal_crawler)
  Using cached requests-2.18.4-py2.py3-none-any.whl
Collecting urllib3<1.23,>=1.21.1 (from requests>=2.15.0->student_portal_crawler)
  Using cached urllib3-1.22-py2.py3-none-any.whl
Collecting idna<2.7,>=2.5 (from requests>=2.15.0->student_portal_crawler)
  Using cached idna-2.6-py2.py3-none-any.whl
Collecting certifi>=2017.4.17 (from requests>=2.15.0->student_portal_crawler)
  Using cached certifi-2018.1.18-py2.py3-none-any.whl
Collecting chardet<3.1.0,>=3.0.2 (from requests>=2.15.0->student_portal_crawler)
  Using cached chardet-3.0.4-py2.py3-none-any.whl
Installing collected packages: lxml, beautifulsoup4, urllib3, idna, certifi, chardet, requests, student-portal-crawler
  Running setup.py install for lxml ... error
    Complete output from command /Users/pudding/test/venv/bin/python3 -u -c "import setuptools, tokenize;__file__='/private/var/folders/gs/3l6zlz4s0x51clkppzd_pfw80000gn/T/pip-build-o8evwk67/lxml/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/gs/3l6zlz4s0x51clkppzd_pfw80000gn/T/pip-yqhsjg19-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/pudding/test/venv/include/site/python3.6/lxml:
    Building lxml version 4.2.0.
    Building without Cython.
    Using build configuration of libxslt 1.1.29
    Building against libxml2/libxslt in the following directory: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/lib
    running install
    running build
    running build_py
    creating build
    creating build/lib.macosx-10.12-x86_64-3.6
    creating build/lib.macosx-10.12-x86_64-3.6/lxml
    copying src/lxml/__init__.py -> build/lib.macosx-10.12-x86_64-3.6/lxml
    copying src/lxml/_elementpath.py -> build/lib.macosx-10.12-x86_64-3.6/lxml
    copying src/lxml/builder.py -> build/lib.macosx-10.12-x86_64-3.6/lxml
    copying src/lxml/cssselect.py -> build/lib.macosx-10.12-x86_64-3.6/lxml
    copying src/lxml/doctestcompare.py -> build/lib.macosx-10.12-x86_64-3.6/lxml
    copying src/lxml/ElementInclude.py -> build/lib.macosx-10.12-x86_64-3.6/lxml
    copying src/lxml/pyclasslookup.py -> build/lib.macosx-10.12-x86_64-3.6/lxml
    copying src/lxml/sax.py -> build/lib.macosx-10.12-x86_64-3.6/lxml
    copying src/lxml/usedoctest.py -> build/lib.macosx-10.12-x86_64-3.6/lxml
    creating build/lib.macosx-10.12-x86_64-3.6/lxml/includes
    copying src/lxml/includes/__init__.py -> build/lib.macosx-10.12-x86_64-3.6/lxml/includes
    creating build/lib.macosx-10.12-x86_64-3.6/lxml/html
    copying src/lxml/html/__init__.py -> build/lib.macosx-10.12-x86_64-3.6/lxml/html
    copying src/lxml/html/_diffcommand.py -> build/lib.macosx-10.12-x86_64-3.6/lxml/html
    copying src/lxml/html/_html5builder.py -> build/lib.macosx-10.12-x86_64-3.6/lxml/html
    copying src/lxml/html/_setmixin.py -> build/lib.macosx-10.12-x86_64-3.6/lxml/html
    copying src/lxml/html/builder.py -> build/lib.macosx-10.12-x86_64-3.6/lxml/html
    copying src/lxml/html/clean.py -> build/lib.macosx-10.12-x86_64-3.6/lxml/html
    copying src/lxml/html/defs.py -> build/lib.macosx-10.12-x86_64-3.6/lxml/html
    copying src/lxml/html/diff.py -> build/lib.macosx-10.12-x86_64-3.6/lxml/html
    copying src/lxml/html/ElementSoup.py -> build/lib.macosx-10.12-x86_64-3.6/lxml/html
    copying src/lxml/html/formfill.py -> build/lib.macosx-10.12-x86_64-3.6/lxml/html
    copying src/lxml/html/html5parser.py -> build/lib.macosx-10.12-x86_64-3.6/lxml/html
    copying src/lxml/html/soupparser.py -> build/lib.macosx-10.12-x86_64-3.6/lxml/html
    copying src/lxml/html/usedoctest.py -> build/lib.macosx-10.12-x86_64-3.6/lxml/html
    creating build/lib.macosx-10.12-x86_64-3.6/lxml/isoschematron
    copying src/lxml/isoschematron/__init__.py -> build/lib.macosx-10.12-x86_64-3.6/lxml/isoschematron
    copying src/lxml/etree.h -> build/lib.macosx-10.12-x86_64-3.6/lxml
    copying src/lxml/etree_api.h -> build/lib.macosx-10.12-x86_64-3.6/lxml
    copying src/lxml/lxml.etree.h -> build/lib.macosx-10.12-x86_64-3.6/lxml
    copying src/lxml/lxml.etree_api.h -> build/lib.macosx-10.12-x86_64-3.6/lxml
    copying src/lxml/includes/__init__.pxd -> build/lib.macosx-10.12-x86_64-3.6/lxml/includes
    copying src/lxml/includes/c14n.pxd -> build/lib.macosx-10.12-x86_64-3.6/lxml/includes
    copying src/lxml/includes/config.pxd -> build/lib.macosx-10.12-x86_64-3.6/lxml/includes
    copying src/lxml/includes/dtdvalid.pxd -> build/lib.macosx-10.12-x86_64-3.6/lxml/includes
    copying src/lxml/includes/etreepublic.pxd -> build/lib.macosx-10.12-x86_64-3.6/lxml/includes
    copying src/lxml/includes/htmlparser.pxd -> build/lib.macosx-10.12-x86_64-3.6/lxml/includes
    copying src/lxml/includes/relaxng.pxd -> build/lib.macosx-10.12-x86_64-3.6/lxml/includes
    copying src/lxml/includes/schematron.pxd -> build/lib.macosx-10.12-x86_64-3.6/lxml/includes
    copying src/lxml/includes/tree.pxd -> build/lib.macosx-10.12-x86_64-3.6/lxml/includes
    copying src/lxml/includes/uri.pxd -> build/lib.macosx-10.12-x86_64-3.6/lxml/includes
    copying src/lxml/includes/xinclude.pxd -> build/lib.macosx-10.12-x86_64-3.6/lxml/includes
    copying src/lxml/includes/xmlerror.pxd -> build/lib.macosx-10.12-x86_64-3.6/lxml/includes
    copying src/lxml/includes/xmlparser.pxd -> build/lib.macosx-10.12-x86_64-3.6/lxml/includes
    copying src/lxml/includes/xmlschema.pxd -> build/lib.macosx-10.12-x86_64-3.6/lxml/includes
    copying src/lxml/includes/xpath.pxd -> build/lib.macosx-10.12-x86_64-3.6/lxml/includes
    copying src/lxml/includes/xslt.pxd -> build/lib.macosx-10.12-x86_64-3.6/lxml/includes
    copying src/lxml/includes/etree_defs.h -> build/lib.macosx-10.12-x86_64-3.6/lxml/includes
    copying src/lxml/includes/lxml-version.h -> build/lib.macosx-10.12-x86_64-3.6/lxml/includes
    creating build/lib.macosx-10.12-x86_64-3.6/lxml/isoschematron/resources
    creating build/lib.macosx-10.12-x86_64-3.6/lxml/isoschematron/resources/rng
    copying src/lxml/isoschematron/resources/rng/iso-schematron.rng -> build/lib.macosx-10.12-x86_64-3.6/lxml/isoschematron/resources/rng
    creating build/lib.macosx-10.12-x86_64-3.6/lxml/isoschematron/resources/xsl
    copying src/lxml/isoschematron/resources/xsl/RNG2Schtrn.xsl -> build/lib.macosx-10.12-x86_64-3.6/lxml/isoschematron/resources/xsl
    copying src/lxml/isoschematron/resources/xsl/XSD2Schtrn.xsl -> build/lib.macosx-10.12-x86_64-3.6/lxml/isoschematron/resources/xsl
    creating build/lib.macosx-10.12-x86_64-3.6/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
    copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_abstract_expand.xsl -> build/lib.macosx-10.12-x86_64-3.6/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
    copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_dsdl_include.xsl -> build/lib.macosx-10.12-x86_64-3.6/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
    copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_message.xsl -> build/lib.macosx-10.12-x86_64-3.6/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
    copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_skeleton_for_xslt1.xsl -> build/lib.macosx-10.12-x86_64-3.6/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
    copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_svrl_for_xslt1.xsl -> build/lib.macosx-10.12-x86_64-3.6/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
    copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/readme.txt -> build/lib.macosx-10.12-x86_64-3.6/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
    running build_ext
    building 'lxml.etree' extension
    creating build/temp.macosx-10.12-x86_64-3.6
    creating build/temp.macosx-10.12-x86_64-3.6/src
    creating build/temp.macosx-10.12-x86_64-3.6/src/lxml
    clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DCYTHON_CLINE_IN_TRACEBACK=0 -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/libxml2 -Isrc -Isrc/lxml/includes -I/Users/pudding/test/venv/include -I/usr/local/var/pyenv/versions/3.6.0/Python.framework/Versions/3.6/include/python3.6m -I/usr/local/var/pyenv/versions/3.6.0/include/python3.6m -c src/lxml/etree.c -o build/temp.macosx-10.12-x86_64-3.6/src/lxml/etree.o -w -flat_namespace
    clang -bundle -undefined dynamic_lookup -L/usr/local/opt/readline/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/openssl/lib -L/usr/local/var/pyenv/versions/3.6.0/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/openssl/lib -L/usr/local/var/pyenv/versions/3.6.0/lib build/temp.macosx-10.12-x86_64-3.6/src/lxml/etree.o -L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/lib -lxslt -lexslt -lxml2 -lz -lm -o build/lib.macosx-10.12-x86_64-3.6/lxml/etree.cpython-36m-darwin.so
    ld: file not found: /usr/lib/system/libsystem_darwin.dylib for architecture x86_64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    error: command 'clang' failed with exit status 1

    ----------------------------------------
Command "/Users/pudding/test/venv/bin/python3 -u -c "import setuptools, tokenize;__file__='/private/var/folders/gs/3l6zlz4s0x51clkppzd_pfw80000gn/T/pip-build-o8evwk67/lxml/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/gs/3l6zlz4s0x51clkppzd_pfw80000gn/T/pip-yqhsjg19-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/pudding/test/venv/include/site/python3.6/lxml" failed with error code 1 in /private/var/folders/gs/3l6zlz4s0x51clkppzd_pfw80000gn/T/pip-build-o8evwk67/lxml/

インストール時に上記のエラーでこける

回避策

$ pip install lxml==4.1.1
@pddg
Copy link
Member Author

pddg commented Mar 16, 2018

@pddg
Copy link
Member Author

pddg commented Mar 16, 2018

lxmlに今出てるプルリクエストが通れば修復されそう

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant