자유게시판
여러분의 의견을 자유롭게 알려주세요.
이 페이지는 의견 교환을 위해 따로 만든 페이지입니다. 책에서 이 페이지를 만드는 법을 직접적으로 다루지는 않습니다.
하지만, 책을 끝까지 읽고 나면 이 페이지도 만드실 수 있을거에요.
하지만, 책을 끝까지 읽고 나면 이 페이지도 만드실 수 있을거에요.
docker-compose build 일반적인 해법을 좀 알려주세요
2 years, 6 months ago
eaoaeaoa대충 둘러 보아도 엄청나게 많은 사람이 비슷한 류의 문제를 겪고 있는 것 같아요.
requirements.txt 관련된 오류가 그 중 하나일 겁니다.
독자 별로 다양한 패키지를 이미 가지고 있고 이것을 docker build하는 과정에서 문제가 많이 발생하는 것 같아요
아마 책 가지고 씨름만 하는 사람들은 땅바닥에 엄청난 시간을 버리고 있을 겁니다
저도 오류 발생시키는 패키지를 txt 파일에서 row by row로 일일이 지워가면서 오류를 해결 중인데,
이 뒤로도 산적한 오류를 만날 생각 하니 눈앞이 깜깜해지네요
일단 이 문제에 관해서만도, 향후 책을 따라가면서 개발을 하기 위해서만이라도 무엇이 필수적인지, 어떤 녀석들이 문제를 잘 일으키는지 표같은 걸 만들어 두기만 해도 일이 훨씬 간단해질 것 같습니다.
FAQ 같은 게시판이 따로 있으면 좋겠다는 생각이 듭니다.
목록보기
eaoaeaoa 2 years, 6 months ago
특히, pycares때문에 문제를 겪고 있어요. pycares가 문제를 일으켜서 진작 지웠는데, 있지도 않은 pycares를 깔겠다면서 자꾸 오류가 납니다. requirements의 내용과 오류 내용을 차례로 붙입니다
absl-py==1.0.0
aiodns==3.0.0
aiohttp==3.8.1
aiosignal==1.2.0
asgiref==3.5.1
asttokens==2.0.5
astunparse==1.6.3
async-timeout==4.0.2
attrs==21.4.0
backcall==0.2.0
beautifulsoup4==4.11.1
branca==0.5.0
bs4==0.0.1
cachetools==5.0.0
ccxt==1.81.77
certifi==2021.10.8
charset-normalizer==2.0.12
colorama==0.4.4
cryptography==37.0.2
cycler==0.11.0
DateTime==4.4
decorator==5.1.1
defusedxml==0.7.1
Django==3.2
django-allauth==0.50.0
django-crispy-forms==1.14.0
django-extensions==3.1.5
django-markdownx==3.0.1
et-xmlfile==1.1.0
executing==0.8.3
flatbuffers==2.0
folium==0.12.1.post1
fonttools==4.33.3
frozenlist==1.3.0
gast==0.5.3
google-auth==2.6.6
google-auth-oauthlib==0.4.6
google-pasta==0.2.0
grpcio==1.46.0
idna==3.3
importlib-metadata==4.11.3
ipython==8.3.0
jedi==0.18.1
Jinja2==3.1.2
joblib==1.1.0
kiwisolver==1.4.2
Markdown==3.3.7
MarkupSafe==2.1.1
mpmath==1.2.1
multidict==6.0.2
numpy==1.22.3
oauthlib==3.2.0
openpyxl==3.0.9
opt-einsum==3.3.0
packaging==21.3
parso==0.8.3
pickleshare==0.7.5
Pillow==9.1.0
prompt-toolkit==3.0.29
protobuf==3.20.1
pure-eval==0.2.2
pyasn1==0.4.8
pyasn1-modules==0.2.8
Pygments==2.12.0
PyJWT==2.3.0
pyparsing==3.0.8
python-dateutil==2.8.2
python3-openid==3.2.0
pytz==2022.1
requests==2.27.1
requests-oauthlib==1.3.1
rsa==4.8
six==1.16.0
soupsieve==2.3.2.post1
sqlparse==0.4.2
squarify==0.4.3
stack-data==0.2.0
sympy==1.10.1
tensorboard==2.8.0
tensorboard-data-server==0.6.1
tensorboard-plugin-wit==1.8.1
termcolor==1.1.0
threadpoolctl==3.1.0
traitlets==5.1.1
typing_extensions==4.2.0
urllib3==1.26.9
wcwidth==0.2.5
Werkzeug==2.1.2
wrapt==1.14.1
xmltodict==0.12.0
yarl==1.7.2
zipp==3.8.0
zope.interface==5.4.0
#11 28.95 Preparing metadata (setup.py): started
#11 29.40 Preparing metadata (setup.py): finished with status 'done'
#11 29.48 Collecting pycares>=4.0.0
#11 29.49 Downloading pycares-4.1.2.tar.gz (819 kB)
#11 29.59 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 819.7/819.7 KB 9.1 MB/s eta 0:00:00
#11 29.69 Preparing metadata (setup.py): started
#11 31.03 Preparing metadata (setup.py): finished with status 'error'
#11 31.04 error: subprocess-exited-with-error
#11 31.04
#11 31.04 × python setup.py egg_info did not run successfully.
#11 31.04 │ exit code: 1
#11 31.04 ╰─> [164 lines of output]
#11 31.04 Package libffi was not found in the pkg-config search path.
#11 31.04 Perhaps you should add the directory containing `libffi.pc'
#11 31.04 to the PKG_CONFIG_PATH environment variable
#11 31.04 Package 'libffi', required by 'virtual:world', not found
#11 31.04 Package libffi was not found in the pkg-config search path.
#11 31.04 Perhaps you should add the directory containing `libffi.pc'
#11 31.04 to the PKG_CONFIG_PATH environment variable
#11 31.04 Package 'libffi', required by 'virtual:world', not found
#11 31.04 Package libffi was not found in the pkg-config search path.
#11 31.04 Perhaps you should add the directory containing `libffi.pc'
#11 31.04 to the PKG_CONFIG_PATH environment variable
#11 31.04 Package 'libffi', required by 'virtual:world', not found
#11 31.04 Package libffi was not found in the pkg-config search path.
#11 31.04 Perhaps you should add the directory containing `libffi.pc'
#11 31.04 to the PKG_CONFIG_PATH environment variable
#11 31.04 Package 'libffi', required by 'virtual:world', not found
#11 31.04 Package libffi was not found in the pkg-config search path.
#11 31.04 Perhaps you should add the directory containing `libffi.pc'
#11 31.04 to the PKG_CONFIG_PATH environment variable
#11 31.04 Package 'libffi', required by 'virtual:world', not found
#11 31.04 warning: build_py: byte-compiling is disabled, skipping.
#11 31.04
#11 31.04 c/_cffi_backend.c:15:10: fatal error: ffi.h: No such file or directory
#11 31.04 #include <ffi.h>
#11 31.04 ^~~~~~~
#11 31.04 compilation terminated.
#11 31.04 Traceback (most recent call last):
#11 31.04 File "/usr/local/lib/python3.8/distutils/unixccompiler.py", line 117, in _compile
#11 31.04 self.spawn(compiler_so + cc_args + [src, '-o', obj] +
#11 31.04 File "/usr/local/lib/python3.8/distutils/ccompiler.py", line 910, in spawn
#11 31.04 spawn(cmd, dry_run=self.dry_run)
#11 31.04 File "/usr/local/lib/python3.8/distutils/spawn.py", line 36, in spawn
#11 31.04 _spawn_posix(cmd, search_path, dry_run=dry_run)
#11 31.04 File "/usr/local/lib/python3.8/distutils/spawn.py", line 157, in _spawn_posix
#11 31.04 raise DistutilsExecError(
#11 31.04 distutils.errors.DistutilsExecError: command 'gcc' failed with exit status 1
#11 31.04
#11 31.04 During handling of the above exception, another exception occurred:
#11 31.04
#11 31.04 Traceback (most recent call last):
#11 31.04 File "/usr/local/lib/python3.8/distutils/core.py", line 148, in setup
#11 31.04 dist.run_commands()
#11 31.04 File "/usr/local/lib/python3.8/distutils/dist.py", line 966, in run_commands
#11 31.04 self.run_command(cmd)
#11 31.04 File "/usr/local/lib/python3.8/distutils/dist.py", line 985, in run_command
#11 31.04 cmd_obj.run()
#11 31.04 File "/usr/local/lib/python3.8/site-packages/setuptools/command/bdist_egg.py", line 172, in run
#11 31.04 cmd = self.call_command('install_lib', warn_dir=0)
#11 31.04 File "/usr/local/lib/python3.8/site-packages/setuptools/command/bdist_egg.py", line 158, in call_command
#11 31.04 self.run_command(cmdname)
#11 31.04 File "/usr/local/lib/python3.8/distutils/cmd.py", line 313, in run_command
#11 31.04 self.distribution.run_command(command)
#11 31.04 File "/usr/local/lib/python3.8/distutils/dist.py", line 985, in run_command
#11 31.04 cmd_obj.run()
#11 31.04 File "/usr/local/lib/python3.8/site-packages/setuptools/command/install_lib.py", line 11, in run
#11 31.04 self.build()
#11 31.04 File "/usr/local/lib/python3.8/distutils/command/install_lib.py", line 107, in build
#11 31.04 self.run_command('build_ext')
#11 31.04 File "/usr/local/lib/python3.8/distutils/cmd.py", line 313, in run_command
#11 31.04 self.distribution.run_command(command)
#11 31.04 File "/usr/local/lib/python3.8/distutils/dist.py", line 985, in run_command
#11 31.04 cmd_obj.run()
#11 31.04 File "/usr/local/lib/python3.8/site-packages/setuptools/command/build_ext.py", line 84, in run
#11 31.04 _build_ext.run(self)
#11 31.04 File "/usr/local/lib/python3.8/distutils/command/build_ext.py", line 340, in run
#11 31.04 self.build_extensions()
#11 31.04 File "/usr/local/lib/python3.8/distutils/command/build_ext.py", line 449, in build_extensions
#11 31.04 self._build_extensions_serial()
#11 31.04 File "/usr/local/lib/python3.8/distutils/command/build_ext.py", line 474, in _build_extensions_serial
#11 31.04 self.build_extension(ext)
#11 31.04 File "/usr/local/lib/python3.8/site-packages/setuptools/command/build_ext.py", line 205, in build_extension
#11 31.04 _build_ext.build_extension(self, ext)
#11 31.04 File "/usr/local/lib/python3.8/distutils/command/build_ext.py", line 528, in build_extension
#11 31.04 objects = self.compiler.compile(sources,
#11 31.04 File "/usr/local/lib/python3.8/distutils/ccompiler.py", line 574, in compile
#11 31.04 self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
#11 31.04 File "/usr/local/lib/python3.8/distutils/unixccompiler.py", line 120, in _compile
#11 31.04 raise CompileError(msg)
#11 31.04 distutils.errors.CompileError: command 'gcc' failed with exit status 1
#11 31.04
#11 31.04 During handling of the above exception, another exception occurred:
#11 31.04
#11 31.04 Traceback (most recent call last):
#11 31.04 File "/usr/local/lib/python3.8/site-packages/setuptools/sandbox.py", line 154, in save_modules
#11 31.04 yield saved
#11 31.04 File "/usr/local/lib/python3.8/site-packages/setuptools/sandbox.py", line 195, in setup_context
#11 31.04 yield
#11 31.04 File "/usr/local/lib/python3.8/site-packages/setuptools/sandbox.py", line 250, in run_setup
#11 31.04 _execfile(setup_script, ns)
#11 31.04 File "/usr/local/lib/python3.8/site-packages/setuptools/sandbox.py", line 45, in _execfile
#11 31.04 exec(code, globals, locals)
#11 31.04 File "/tmp/easy_install-7e9lm71n/cffi-1.15.0/setup.py", line 174, in <module>
#11 31.04 File "/usr/local/lib/python3.8/site-packages/setuptools/__init__.py", line 145, in setup
#11 31.04 return distutils.core.setup(**attrs)
#11 31.04 File "/usr/local/lib/python3.8/distutils/core.py", line 163, in setup
#11 31.04 raise SystemExit("error: " + str(msg))
#11 31.04 SystemExit: error: command 'gcc' failed with exit status 1
#11 31.04
#11 31.04 During handling of the above exception, another exception occurred:
#11 31.04
#11 31.04 Traceback (most recent call last):
#11 31.04 File "/usr/local/lib/python3.8/site-packages/setuptools/command/easy_install.py", line 1144, in run_setup
#11 31.04 run_setup(setup_script, args)
#11 31.04 File "/usr/local/lib/python3.8/site-packages/setuptools/sandbox.py", line 253, in run_setup
#11 31.04 raise
#11 31.04 File "/usr/local/lib/python3.8/contextlib.py", line 131, in __exit__
#11 31.04 self.gen.throw(type, value, traceback)
#11 31.04 File "/usr/local/lib/python3.8/site-packages/setuptools/sandbox.py", line 195, in setup_context
#11 31.04 yield
#11 31.04 File "/usr/local/lib/python3.8/contextlib.py", line 131, in __exit__
#11 31.04 self.gen.throw(type, value, traceback)
#11 31.04 File "/usr/local/lib/python3.8/site-packages/setuptools/sandbox.py", line 166, in save_modules
#11 31.04 saved_exc.resume()
#11 31.04 File "/usr/local/lib/python3.8/site-packages/setuptools/sandbox.py", line 141, in resume
#11 31.04 six.reraise(type, exc, self._tb)
#11 31.04 File "/usr/local/lib/python3.8/site-packages/setuptools/_vendor/six.py", line 685, in reraise
#11 31.04 raise value.with_traceback(tb)
#11 31.04 File "/usr/local/lib/python3.8/site-packages/setuptools/sandbox.py", line 154, in save_modules
#11 31.04 yield saved
#11 31.04 File "/usr/local/lib/python3.8/site-packages/setuptools/sandbox.py", line 195, in setup_context
#11 31.04 yield
#11 31.04 File "/usr/local/lib/python3.8/site-packages/setuptools/sandbox.py", line 250, in run_setup
#11 31.04 _execfile(setup_script, ns)
#11 31.04 File "/usr/local/lib/python3.8/site-packages/setuptools/sandbox.py", line 45, in _execfile
#11 31.04 exec(code, globals, locals)
#11 31.04 File "/tmp/easy_install-7e9lm71n/cffi-1.15.0/setup.py", line 174, in <module>
#11 31.04 File "/usr/local/lib/python3.8/site-packages/setuptools/__init__.py", line 145, in setup
#11 31.04 return distutils.core.setup(**attrs)
#11 31.04 File "/usr/local/lib/python3.8/distutils/core.py", line 163, in setup
#11 31.04 raise SystemExit("error: " + str(msg))
#11 31.04 SystemExit: error: command 'gcc' failed with exit status 1
#11 31.04
#11 31.04 During handling of the above exception, another exception occurred:
#11 31.04
#11 31.04 Traceback (most recent call last):
#11 31.04 File "<string>", line 2, in <module>
#11 31.04 File "<pip-setuptools-caller>", line 34, in <module>
#11 31.04 File "/tmp/pip-install-7khczdd0/pycares_ec081cd22df94a9382733ca7f3443d28/setup.py", line 16, in <module>
#11 31.04 setup(name = 'pycares',
#11 31.04 File "/usr/local/lib/python3.8/site-packages/setuptools/__init__.py", line 144, in setup
#11 31.04 _install_setup_requires(attrs)
#11 31.04 File "/usr/local/lib/python3.8/site-packages/setuptools/__init__.py", line 139, in _install_setup_requires
#11 31.04 dist.fetch_build_eggs(dist.setup_requires)
#11 31.04 File "/usr/local/lib/python3.8/site-packages/setuptools/dist.py", line 717, in fetch_build_eggs
#11 31.04 resolved_dists = pkg_resources.working_set.resolve(
#11 31.04 File "/usr/local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 780, in resolve
#11 31.04 dist = best[req.key] = env.best_match(
#11 31.04 File "/usr/local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1065, in best_match
#11 31.04 return self.obtain(req, installer)
#11 31.04 File "/usr/local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1077, in obtain
#11 31.04 return installer(requirement)
#11 31.04 File "/usr/local/lib/python3.8/site-packages/setuptools/dist.py", line 787, in fetch_build_egg
#11 31.04 return cmd.easy_install(req)
#11 31.04 File "/usr/local/lib/python3.8/site-packages/setuptools/command/easy_install.py", line 679, in easy_install
#11 31.04 return self.install_item(spec, dist.location, tmpdir, deps)
#11 31.04 File "/usr/local/lib/python3.8/site-packages/setuptools/command/easy_install.py", line 705, in install_item
#11 31.04 dists = self.install_eggs(spec, download, tmpdir)
#11 31.04 File "/usr/local/lib/python3.8/site-packages/setuptools/command/easy_install.py", line 890, in install_eggs
#11 31.04 return self.build_and_install(setup_script, setup_base)
#11 31.04 File "/usr/local/lib/python3.8/site-packages/setuptools/command/easy_install.py", line 1158, in build_and_install
#11 31.04 self.run_setup(setup_script, setup_base, args)
#11 31.04 File "/usr/local/lib/python3.8/site-packages/setuptools/command/easy_install.py", line 1146, in run_setup
#11 31.04 raise DistutilsError("Setup script exited with %s" % (v.args[0],))
#11 31.04 distutils.errors.DistutilsError: Setup script exited with error: command 'gcc' failed with exit status 1
#11 31.04 [end of output]
#11 31.04
#11 31.04 note: This error originates from a subprocess, and is likely not a problem with pip.
#11 31.04 error: metadata-generation-failed
#11 31.04
#11 31.04 × Encountered error while generating package metadata.
#11 31.04 ╰─> See above for output.
#11 31.04
#11 31.04 note: This is an issue with the package mentioned above, not pip.
#11 31.04 hint: See above for details.
------
executor failed running [/bin/sh -c pip install -r requirements.txt]: exit code: 1
ERROR: Service 'web' failed to build : Build failed
Updated: May 10, 2022, 4:04 a.m.
eaoaeaoa 2 years, 6 months ago
결국 대문에 있는 방식대로 alpine 대신 slim buster를 쓰고 RUN 부분을 #처리 해서 해결하고, 이후에 sslserver 패키지가 없다는 오류는 가상환경에 django-sslserver<=0.22.0을 추가로 다운로드해서 해결했습니다.
Updated: May 10, 2022, 6:03 p.m.
Leave a Comment: