UrielCh / opencv4nodejs

ESM Nodejs bindings to OpenCV 3/4
MIT License
223 stars 45 forks source link

mac m1 use electron build Ubuntu exe.. hit opencv4nodejs.node: invalid ELF header #48

Open rr13k opened 1 year ago

rr13k commented 1 year ago

hi, I use @u4/opencv4nodejs in the electron. The Mac package runs normally, but when I package Ubuntu, I cannot run the prompt opencv4nodejs node: invalid ELF header.

I guess it's because of the packaging environment, but because of the network problem, I can't get through Ubuntu

@U4/opencv buildfor automatic compilation,

I try to compile opencv manually and configure it with the following command

export OPENCV4NODEJS_ DISABLE_ AUTOBUILD=1

export OPENCV_ INCLUDE_ DIR="/usr/local/opencv_4.1.2/include"

export OPENCV_ LIB_ DIR="/usr/local/opencv_4.1.2/lib"

export OPENCV_ BIN_ DIR="/usr/local/opencv_4.1.2/bin"

After configuration, I can successfully install opencv4nodejs

However, it cannot be used in the electricity process because it is required in the normal electricity process

build-opencv --electron --version 4.5.4 build

Therefore, I need to know that if you use the local opencv to do -- electric build

Thanks for any guidance.

Because of the project problem, we can't provide an example. I'm sorry.

UrielCh commented 1 year ago

Still not using electron, can not helps.

I have an electron sample here it may be outdated...