博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
django部署踩坑
阅读量:3909 次
发布时间:2019-05-23

本文共 7999 字,大约阅读时间需要 26 分钟。

一、error: command ‘x86_64-linux-gnu-gcc’ failed with exit status 1(mysqlclient)

大致报错如下:

Running setup.py install for mysqlclient ... error    ERROR: Command errored out with exit status 1:     command: /home/kai/python/env/djangoblog/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-d07knlry/mysqlclient/setup.py'"'"'; __file__='"'"'/tmp/pip-install-d07knlry/mysqlclient/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-mkay836m/install-record.txt --single-version-externally-managed --compile --install-headers /home/kai/python/env/djangoblog/include/site/python3.6/mysqlclient         cwd: /tmp/pip-install-d07knlry/mysqlclient/    Complete output (33 lines):    /usr/lib/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'long_description_content_type'      warnings.warn(msg)    running install    running build    running build_py    creating build    creating build/lib.linux-x86_64-3.6    creating build/lib.linux-x86_64-3.6/MySQLdb    copying MySQLdb/__init__.py -> build/lib.linux-x86_64-3.6/MySQLdb    copying MySQLdb/_exceptions.py -> build/lib.linux-x86_64-3.6/MySQLdb    copying MySQLdb/compat.py -> build/lib.linux-x86_64-3.6/MySQLdb    copying MySQLdb/connections.py -> build/lib.linux-x86_64-3.6/MySQLdb    copying MySQLdb/converters.py -> build/lib.linux-x86_64-3.6/MySQLdb    copying MySQLdb/cursors.py -> build/lib.linux-x86_64-3.6/MySQLdb    copying MySQLdb/release.py -> build/lib.linux-x86_64-3.6/MySQLdb    copying MySQLdb/times.py -> build/lib.linux-x86_64-3.6/MySQLdb    creating build/lib.linux-x86_64-3.6/MySQLdb/constants    copying MySQLdb/constants/__init__.py -> build/lib.linux-x86_64-3.6/MySQLdb/constants    copying MySQLdb/constants/CLIENT.py -> build/lib.linux-x86_64-3.6/MySQLdb/constants    copying MySQLdb/constants/CR.py -> build/lib.linux-x86_64-3.6/MySQLdb/constants    copying MySQLdb/constants/ER.py -> build/lib.linux-x86_64-3.6/MySQLdb/constants    copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.linux-x86_64-3.6/MySQLdb/constants    copying MySQLdb/constants/FLAG.py -> build/lib.linux-x86_64-3.6/MySQLdb/constants    running build_ext    building 'MySQLdb._mysql' extension    creating build/temp.linux-x86_64-3.6    creating build/temp.linux-x86_64-3.6/MySQLdb    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Dversion_info=(1,4,4,'final',0) -D__version__=1.4.4 -I/usr/include/mysql -I/usr/include/python3.6m -I/home/kai/python/env/djangoblog/include/python3.6m -c MySQLdb/_mysql.c -o build/temp.linux-x86_64-3.6/MySQLdb/_mysql.o    x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.6/MySQLdb/_mysql.o -lmysqlclient -lpthread -lz -lm -lrt -lssl -lcrypto -ldl -o build/lib.linux-x86_64-3.6/MySQLdb/_mysql.cpython-36m-x86_64-linux-gnu.so    /usr/bin/ld: cannot find -lssl    /usr/bin/ld: cannot find -lcrypto    collect2: error: ld returned 1 exit status    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1    ----------------------------------------ERROR: Command errored out with exit status 1: /home/kai/python/env/djangoblog/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-d07knlry/mysqlclient/setup.py'"'"'; __file__='"'"'/tmp/pip-install-d07knlry/mysqlclient/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-mkay836m/install-record.txt --single-version-externally-managed --compile --install-headers /home/kai/python/env/djangoblog/include/site/python3.6/mysqlclient Check the logs for full command output.

解决办法:

二、pip安装出现Command “python setup.py egg_info” failed with error code 1 的解决方案

报错如下:

ERROR: Command errored out with exit status 1:     command: /home/kai/python/env/djangoblog/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-kzmacki4/django-haystack/setup.py'"'"'; __file__='"'"'/tmp/pip-install-kzmacki4/django-haystack/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-kzmacki4/django-haystack/pip-egg-info         cwd: /tmp/pip-install-kzmacki4/django-haystack/    Complete output (33 lines):    WARNING: The repository located at pypi.douban.com is not a trusted or secure host and is being ignored. If this repository is available via HTTPS we recommend you use HTTPS instead, otherwise you may silence this warning and allow it anyway with '--trusted-host pypi.douban.com'.    ERROR: Could not find a version that satisfies the requirement setuptools_scm (from versions: none)    ERROR: No matching distribution found for setuptools_scm    Traceback (most recent call last):      File "/home/kai/python/env/djangoblog/lib/python3.6/site-packages/setuptools/installer.py", line 119, in fetch_build_egg        subprocess.check_call(cmd)      File "/usr/lib/python3.6/subprocess.py", line 311, in check_call        raise CalledProcessError(retcode, cmd)    subprocess.CalledProcessError: Command '['/home/kai/python/env/djangoblog/bin/python3', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmpobxct58l', '--quiet', 'setuptools_scm']' returned non-zero exit status 1.        During handling of the above exception, another exception occurred:        Traceback (most recent call last):      File "
", line 1, in
File "/tmp/pip-install-kzmacki4/django-haystack/setup.py", line 71, in
setup_requires=['setuptools_scm'], File "/home/kai/python/env/djangoblog/lib/python3.6/site-packages/setuptools/__init__.py", line 144, in setup _install_setup_requires(attrs) File "/home/kai/python/env/djangoblog/lib/python3.6/site-packages/setuptools/__init__.py", line 139, in _install_setup_requires dist.fetch_build_eggs(dist.setup_requires) File "/home/kai/python/env/djangoblog/lib/python3.6/site-packages/setuptools/dist.py", line 721, in fetch_build_eggs replace_conflicting=True, File "/home/kai/python/env/djangoblog/lib/python3.6/site-packages/pkg_resources/__init__.py", line 782, in resolve replace_conflicting=replace_conflicting File "/home/kai/python/env/djangoblog/lib/python3.6/site-packages/pkg_resources/__init__.py", line 1065, in best_match return self.obtain(req, installer) File "/home/kai/python/env/djangoblog/lib/python3.6/site-packages/pkg_resources/__init__.py", line 1077, in obtain return installer(requirement) File "/home/kai/python/env/djangoblog/lib/python3.6/site-packages/setuptools/dist.py", line 777, in fetch_build_egg return fetch_build_egg(self, req) File "/home/kai/python/env/djangoblog/lib/python3.6/site-packages/setuptools/installer.py", line 121, in fetch_build_egg raise DistutilsError(str(e)) distutils.errors.DistutilsError: Command '['/home/kai/python/env/djangoblog/bin/python3', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmpobxct58l', '--quiet', 'setuptools_scm']' returned non-zero exit status 1. ----------------------------------------ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

解决办法:

三、ERROR 1819 (HY000): Your password does not satisfy the current policy requirements

解决办法:

四、ubuntu系统下登陆mysql输入命令无效

解决办法:

五、windows xrdp远程ubuntu黑屏

转载地址:http://jzkrn.baihongyu.com/

你可能感兴趣的文章
【Azure学习.01】先从账号注册开始
查看>>
如何运用领域驱动设计 - 工作单元
查看>>
服务器应用服务为何卡顿?原来是内存耗尽惹的祸!
查看>>
什么?原来C#还有这两个关键字
查看>>
Mbp,一个用于学习.net core的开发框架
查看>>
【Magicodes.IE 2.0.0-beta1版本发布】已支持数据表格、列筛选器和Sheet拆分
查看>>
net下的高性能轻量化半自动orm+linq的《SqlBatis》
查看>>
如何利用Serilog的RequestLogging来精简ASP.NET Core的日志输出
查看>>
在 Blazor WebAssembly 中使用 gRPC-Web
查看>>
【实战 Ids4】║ 在Swagger中调试认证授权中心
查看>>
.NET Core开发实战(第10课:环境变量配置提供程序)--学习笔记
查看>>
WTM系列视频教程:View和Taghelper
查看>>
面试官:你连HTTP请求Post和Get都不了解?
查看>>
.NET Core 3.0 即将结束生命周期,建议迁移 3.1
查看>>
开源、免费、企业级的SiteServer CMS .NET CORE 7.0 预览版发布
查看>>
基于.NET下的人工智能|利用ICSharpCore搭建基于.NET Core的机器学习和深度学习的本地开发环境...
查看>>
【朝夕Net社区技术专刊】Core3.1 WebApi集群实战专题---WebApi环境搭建运行发布部署篇...
查看>>
200行代码,7个对象——让你了解ASP.NET Core框架的本质[3.x版]
查看>>
.NET Core开发实战(第21课:中间件:掌控请求处理过程的关键)--学习笔记(下)...
查看>>
对比Java和.NET多线程编程
查看>>