ckan-docker icon indicating copy to clipboard operation
ckan-docker copied to clipboard

failed to find libmagic

Open timiil opened this issue 2 years ago • 2 comments

hello all, my steps is :

git clone https://github.com/ckan/ckan-docker/

cd ckan-docker

docker-compose build

docker-compose up

everything works well, but when we use https://0.0.0.0:8443 we have two problem:

1, when we upload the json file and click the 'Upload to DataStore' it failed:

Error: File "/usr/lib/python3.9/site-packages/apscheduler/executors/base.py", line 125, in run_job retval = job.func(*job.args, **job.kwargs) File "/usr/lib/python3.9/site-packages/datapusher-0.0.20-py3.9.egg/datapusher/jobs.py", line 433, in push_to_datastore table_set = messytables.any_tableset(tmp, mimetype=ct, extension=ct) File "/usr/lib/python3.9/site-packages/messytables/any.py", line 153, in any_tableset magic_mime = get_mime(fileobj) File "/usr/lib/python3.9/site-packages/messytables/any.py", line 62, in get_mime import magic File "/usr/lib/python3.9/site-packages/magic/__init__.py", line 209, in <module> libmagic = loader.load_lib() File "/usr/lib/python3.9/site-packages/magic/loader.py", line 49, in load_lib raise ImportError('failed to find libmagic. Check your installation') ImportError('failed to find libmagic. Check your installation') 

2, every time the page redirect is failed because it alway redirect to 'https://localhost:8443/xxxxx’ page, but not the machine ip. so where we can reconfig the 'site name' ?

timiil avatar May 26 '23 13:05 timiil

For 2), try changing the environment variable in the .env file as follows: CKAN_SITE_URL=https://<whatever.you.want>:8443. Make sure you remove/start the CKAN container and delete the CKAN image after you make the change

kowh-ai avatar May 29 '23 08:05 kowh-ai

For 1), I'm not sure why your DataPusher container doesn't find libmagic...The image should contain this library https://github.com/ckan/ckan-docker-base/blob/main/datapusher/Dockerfile#L29

kowh-ai avatar May 29 '23 11:05 kowh-ai