Xsane, network scanner, and MX23.1

I have a SOLUTION !!!

One of the brother libraries /usr/lib64/sane/libsane-brother2.so.1.0.7
requires a version of libusb.so that is not present in my MX23

$ ldd /usr/lib64/sane/libsane-brother2.so.1.0.7 |more
	linux-vdso.so.1 (0x00007ffdf95f6000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f7e7247f000)
	libnsl.so.1 => /lib/x86_64-linux-gnu/libnsl.so.1 (0x00007f7e72465000)
	libusb-0.1.so.4 => not found
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f7e72221000)
	libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f7e72460000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f7e72040000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f7e7249a000)

Notice that libusb-0.1.so.4 is NOT FOUND.

What I have is an earlier version

nevj@trinity:/usr/lib/x86_64-linux-gnu
$ ls libusb*
libusb-1.0.so.0      libusbmuxd-2.0.so.6      libusbmuxd.so.6
libusb-1.0.so.0.3.0  libusbmuxd-2.0.so.6.0.0  libusbmuxd.so.6.0.0

So how do I get a later version?
Turns out there is a package

So lets install it

root@trinity:/common/Brother/debbrother# apt-get install libusb-0.1-4
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
  libusb-0.1-4
0 upgraded, 1 newly installed, 0 to remove and 12 not upgraded.
Need to get 23.4 kB of archives.
After this operation, 59.4 kB of additional disk space will be used.
Get:1 http://deb.debian.org/debian bookworm/main amd64 libusb-0.1-4 amd64 2:0.1.12-32 [23.4 kB]
Fetched 23.4 kB in 0s (96.0 kB/s)       
Selecting previously unselected package libusb-0.1-4:amd64.
(Reading database ... 423937 files and directories currently installed.)
Preparing to unpack .../libusb-0.1-4_2%3a0.1.12-32_amd64.deb ...
Unpacking libusb-0.1-4:amd64 (2:0.1.12-32) ...
Setting up libusb-0.1-4:amd64 (2:0.1.12-32) ...
Processing triggers for libc-bin (2.36-9+deb12u3) ...

So now I have 2 versions of libusb

nevj@trinity:/usr/lib/x86_64-linux-gnu
$ ls -l libusb*
lrwxrwxrwx 1 root root     19 May  5  2018 libusb-0.1.so.4 -> libusb-0.1.so.4.4.4
-rw-r--r-- 1 root root  31024 May  5  2018 libusb-0.1.so.4.4.4
lrwxrwxrwx 1 root root     19 Apr 11  2022 libusb-1.0.so.0 -> libusb-1.0.so.0.3.0
-rw-r--r-- 1 root root 121936 Apr 11  2022 libusb-1.0.so.0.3.0

That should be OK.
Now try xsane ( for the umpteenth time)
and it works

There is my xsane gui… just like in MX21.

End of issue… well not quite.
In the course of researching this, I found and followed the following Ubuntu discussion

One of the hints I tried (unsuccessfuly) was to add a udev rule for the brother scanner
I did this…

cd /lib/udev/rules.d
$ cat >  /lib/udev/rules.d/60-libsane-brother.rules
  ATTRS{idVendor}=="04f9", ENV{libsane_matched}="yes"
CTRL D

then reboot, and purge and reinstall the brother drivers.
It did nothing useful.
It is still there… I need to cleanup and check if it is necessary to have this as well as the missing library.

Thank you to those who made suggestions.

PS I checked back to MX21… it has the library libusb-0.1.so.4
So it looks to me like Debian has left behind that library, when it moved from Debian 11 to Debian 12. MX simply reflects the Debian situation.
I wonder what would have happened had I done an inline upgrade rather than a fresh install of the latest release?

4 Likes