Open sysdef opened 4 years ago
The problem is that OpenCV already uses Gtk3 while libwxgtk3.0-dev
pulls in libraries compiled against Gtk2, thus resulting in the error message. Install libwxgtk3.0-gtk3-dev
:
sudo apt-get install libwxgtk3.0-gtk3-dev
and run
sudo update-alternatives --config wx-config
and choose the entry pointing to a file called gtk3-unicode-3.0
. Then run
./configure && make
Instead of changing the setting where wx-config
should point to, it is also possible to check where the gtk3-unicode-3.0
file is located and then run:
dpkg -L libwxgtk3.0-gtk3-dev | grep gtk3-unicode-3.0
./configure --with-wx-config=<path/to/gtk3-unicode-3.0> && make
On amd64 (e.g. Buster) it would be:
./configure --with-wx-config=/usr/lib/x86_64-linux-gnu/wx/config/gtk3-unicode-3.0 && make
or on armhf (e.g. Raspbian)
./configure --with-wx-config=/usr/lib/arm-linux-gnueabihf/wx/config/gtk3-unicode-3.0 && make
(makerscanner:27601): Gtk-ERROR **: 14:30:15.634: GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported Trace/breakpoint trap