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

Cannot build docker image: could not find lib geos_c #4426

Closed
evekeen opened this issue Mar 5, 2022 · 2 comments
Closed

Cannot build docker image: could not find lib geos_c #4426

evekeen opened this issue Mar 5, 2022 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@evekeen
Copy link
Contributor

evekeen commented Mar 5, 2022

Steps:

  1. Run docker-compose -f docker-compose.yml -f docker-compose.dev.yml build
  2. Run docker-compose -f docker-compose.yml -f docker-compose.dev.yml up
2022-03-05 18:06:02,650 DEBG 'rqworker_default_0' stderr output:
cvat        | Traceback (most recent call last):
cvat        |   File "/home/django/manage.py", line 21, in <module>
cvat        |     execute_from_command_line(sys.argv)
cvat        |   File "/opt/venv/lib/python3.8/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line
cvat        |     utility.execute()
cvat        |   File "/opt/venv/lib/python3.8/site-packages/django/core/management/__init__.py", line 413, in execute
cvat        |     self.fetch_command(subcommand).run_from_argv(self.argv)
cvat        |   File "/opt/venv/lib/python3.8/site-packages/django/core/management/base.py", line 354, in run_from_argv
cvat        |     self.execute(*args, **cmd_options)
cvat        |   File "/opt/venv/lib/python3.8/site-packages/django/core/management/base.py", line 393, in execute
cvat        |     self.check()
cvat        |   File "/opt/venv/lib/python3.8/site-packages/django/core/management/base.py", line 419, in check
cvat        |     all_issues = checks.run_checks(
cvat        |   File "/opt/venv/lib/python3.8/site-packages/django/core/checks/registry.py", line 76, in run_checks
cvat        |     new_errors = check(app_configs=app_configs, databases=databases)
cvat        |   File "/opt/venv/lib/python3.8/site-packages/django/core/checks/urls.py", line 13, in check_url_config
cvat        |     return check_resolver(resolver)
cvat        |   File "/opt/venv/lib/python3.8/site-packages/django/core/checks/urls.py", line 23, in check_resolver
cvat        |     return check_method()
cvat        |   File "/opt/venv/lib/python3.8/site-packages/django/urls/resolvers.py", line 416, in check
cvat        |     for pattern in self.url_patterns:
cvat        |   File "/opt/venv/lib/python3.8/site-packages/django/utils/functional.py", line 48, in __get__
cvat        |     res = instance.__dict__[self.name] = self.func(instance)
cvat        |   File "/opt/venv/lib/python3.8/site-packages/django/urls/resolvers.py", line 602, in url_patterns
cvat        |     patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
cvat        |   File "/opt/venv/lib/python3.8/site-packages/django/utils/functional.py", line 48, in __get__
cvat        |     res = instance.__dict__[self.name] = self.func(instance)
cvat        |   File "/opt/venv/lib/python3.8/site-packages/django/urls/resolvers.py", line 595, in urlconf_module
cvat        |     return import_module(self.urlconf_name)
cvat        |   File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
cvat        |     return _bootstrap._gcd_import(name[level:], package, level)
cvat        |   File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
cvat        |   File "<frozen importlib._bootstrap>", line 991, in _find_and_load
cvat        |   File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
cvat        |   File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
cvat        |   File "<frozen importlib._bootstrap_external>", line 848, in exec_module
cvat        |   File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
cvat        |   File "/home/django/cvat/urls.py", line 27, in <module>
cvat        |     path('', include('cvat.apps.engine.urls')),
cvat        |   File "/opt/venv/lib/python3.8/site-packages/django/urls/conf.py", line 34, in include
cvat        |     urlconf_module = import_module(urlconf_module)
cvat        |   File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
cvat        |     return _bootstrap._gcd_import(name[level:], package, level)
cvat        |   File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
cvat        |   File "<frozen importlib._bootstrap>", line 991, in _find_and_load
cvat        |   File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
cvat        |   File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
cvat        |   File "<frozen importlib._bootstrap_external>", line 848, in exec_module
cvat        |   File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
cvat        |   File "/home/django/cvat/apps/engine/urls.py", line 7, in <module>
cvat        |     from . import views
cvat        |   File "/home/django/cvat/apps/engine/views.py", line 42, in <module>
cvat        |     import cvat.apps.dataset_manager.views  # pylint: disable=unused-import
cvat        |   File "/home/django/cvat/apps/dataset_manager/views.py", line 15, in <module>
cvat        |     import cvat.apps.dataset_manager.task as task
cvat        |   File "/home/django/cvat/apps/dataset_manager/task.py", line 17, in <module>
cvat        |     from .annotation import AnnotationIR, AnnotationManager
cvat        |   File "/home/django/cvat/apps/dataset_manager/annotation.py", line 10, in <module>
cvat        |     from shapely import geometry
cvat        |   File "/opt/venv/lib/python3.8/site-packages/shapely/geometry/__init__.py", line 4, in <module>
cvat        |     from .base import CAP_STYLE, JOIN_STYLE
cvat        |   File "/opt/venv/lib/python3.8/site-packages/shapely/geometry/base.py", line 19, in <module>
cvat        |     from shapely.coords import CoordinateSequence
cvat        |   File "/opt/venv/lib/python3.8/site-packages/shapely/coords.py", line 8, in <module>
cvat        |     from shapely.geos import lgeos
cvat        |   File "/opt/venv/lib/python3.8/site-packages/shapely/geos.py", line 87, in <module>
cvat        |     _lgeos = load_dll('geos_c', fallbacks=alt_paths)
cvat        |   File "/opt/venv/lib/python3.8/site-packages/shapely/geos.py", line 60, in load_dll
cvat        |     raise OSError(
cvat        | OSError: Could not find lib geos_c or load any of its variants ['libgeos_c.so.1', 'libgeos_c.so'].

I've tried installing libgeos in the Docker container by every different way, and they all didn't help. For example:

apt-get   --no-install-recommends install -yq \
        libcurl4-openssl-dev \
        libssl-dev \
        libjq-dev \
        libprotobuf-dev \
        protobuf-compiler \
        libudunits2-dev \
        libgdal-dev \
        gdal-bin \
        libproj-dev \
        libv8-dev \
        libgeos-dev \
        libgeos-3.8.0 \
        libgeos-c1v5
```
@evekeen
Copy link
Contributor Author

evekeen commented Mar 13, 2022

I've fixed in here: #4451

@nmanovic
Copy link
Contributor

@evekeen , thanks for the comment and contribution. I will close the issue.

@nmanovic nmanovic added the bug Something isn't working label Mar 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants