loading vix fails after docker seems to install its library fine.

Im at a loss for trying to understand this error while trying to launch an app. I have a feeling it might have to do with copying an instal to another folder using docker but I am lost…

{error,
2022-12-09T06:57:17Z [info] {load_failed,
2022-12-09T06:57:17Z [info] “Failed to load NIF library /app/lib/vix-0.14.0/priv/vix: ‘libvips.so.42: cannot open shared object file: No such file or directory’”}}}}},
2022-12-09T06:57:17Z [info] {kernel,start,[normal,]}}
2022-12-09T06:57:17Z [info] in function application_master:init/4 (application_master.erl, line 142)
2022-12-09T06:57:17Z [info] ancestors: [<0.2025.0>]
2022-12-09T06:57:17Z [info] message_queue_len: 1
2022-12-09T06:57:17Z [info] messages: [{‘EXIT’,<0.2027.0>,normal}]
2022-12-09T06:57:17Z [info] links: [<0.2025.0>,<0.2024.0>]
2022-12-09T06:57:17Z [info] dictionary:
2022-12-09T06:57:17Z [info] trap_exit: true
2022-12-09T06:57:17Z [info] status: running
2022-12-09T06:57:17Z [info] heap_size: 987
2022-12-09T06:57:17Z [info] stack_size: 28
2022-12-09T06:57:17Z [info] reductions: 189
2022-12-09T06:57:17Z [info] neighbours:
2022-12-09T06:57:17Z [info] INFO REPORT==== 9-Dec-2022::06:57:17.870746 ===
2022-12-09T06:57:17Z [info] application: kernel
2022-12-09T06:57:17Z [info] exited: {{shutdown,
2022-12-09T06:57:17Z [info] {failed_to_start_child,kernel_safe_sup,
2022-12-09T06:57:17Z [info] {on_load_function_failed,‘Elixir.Vix.Nif’,
2022-12-09T06:57:17Z [info] {error,
2022-12-09T06:57:17Z [info] {load_failed,
2022-12-09T06:57:17Z [info] “Failed to load NIF library /app/lib/vix-0.14.0/priv/vix: ‘libvips.so.42: cannot open shared object file: No such file or directory’”}}}}},
2022-12-09T06:57:17Z [info] {kernel,start,[normal,]}}
2022-12-09T06:57:17Z [info] type: permanent
2022-12-09T06:57:18Z [info]{“Kernel pid terminated”,application_controller,“{application_start_failure,kernel,Kernel pid terminated (application_controller) ({application_start_failure,kernel,{{shutdown,{failed_to_start_child,kernel_safe_sup,{on_load_function_failed,‘Elixir.Vix.Nif’,{error,{load_failed,“Failed to load NIF library /app/lib/vix-0.14.0/priv/vix: ‘libvips.so.42: cannot open shared object file: No such file or directory’”}}}}},{kernel,start,[normal,]}}})
2022-12-09T06:57:18Z [info]Crash dump is being written to: erl_crash.dump…{{shutdown,{failed_to_start_child,kernel_safe_sup,{on_load_function_failed,‘Elixir.Vix.Nif’,{error,{load_failed,"Failed to load NIF library /app/lib/vix-0.14.0/priv/vix: ‘libvips.so.42: cannot open shared object file: No such file or directory’"}}}}},{kernel,start,[normal,]}}}”}
2022-12-09T06:57:18Z [info]done
2022-12-09T06:57:19Z [info]Starting clean up.
→ v0 failed - Failed due to unhealthy allocations - no stable job version to auto revert to and deploying as v1

Hi @nutheory,

My guess from the error message is that some dependency in the app is using a NIF and the underlying system libraries are missing.

Assuming you are using Debian, you can do a search for “debian libvips.so” and find the package that provides it.

https://packages.debian.org/bullseye/libvips

Looks like it might be “libvips42”.