Closed richbai90 closed 2 years ago
I'm not a gphoto dev, just some general ideas. See if libs are fine using ldd /usr/local/bin/gphoto2
. Also, running ldconfig
may help.
Thanks for the advice, it looks like the libraries are all properly loaded though. The output from ldd
shows:
linux-vdso.so.1 (0xbedc3000)
/usr/lib/arm-linux-gnueabihf/libarmmem-${PLATFORM}.so => /usr/lib/arm-linux-gnueabihf/libarmmem-v7l.so (0xb6fa2000)
libgphoto2.so.6 => /lib/arm-linux-gnueabihf/libgphoto2.so.6 (0xb6efb000)
libgphoto2_port.so.12 => /lib/arm-linux-gnueabihf/libgphoto2_port.so.12 (0xb6ee1000)
libcdk.so.5 => /lib/arm-linux-gnueabihf/libcdk.so.5 (0xb6e9f000)
libncurses.so.6 => /lib/arm-linux-gnueabihf/libncurses.so.6 (0xb6e70000)
libaa.so.1 => /lib/arm-linux-gnueabihf/libaa.so.1 (0xb6e45000)
libjpeg.so.62 => /lib/arm-linux-gnueabihf/libjpeg.so.62 (0xb6dfe000)
libpthread.so.0 => /lib/arm-linux-gnueabihf/libpthread.so.0 (0xb6dd2000)
libexif.so.12 => /lib/arm-linux-gnueabihf/libexif.so.12 (0xb6d8d000)
libreadline.so.8 => /lib/arm-linux-gnueabihf/libreadline.so.8 (0xb6d3a000)
libpopt.so.0 => /lib/arm-linux-gnueabihf/libpopt.so.0 (0xb6d1f000)
libm.so.6 => /lib/arm-linux-gnueabihf/libm.so.6 (0xb6cb0000)
libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0xb6b5c000)
/lib/ld-linux-armhf.so.3 (0xb6fb7000)
libltdl.so.7 => /lib/arm-linux-gnueabihf/libltdl.so.7 (0xb6b44000)
libtinfo.so.6 => /lib/arm-linux-gnueabihf/libtinfo.so.6 (0xb6b12000)
libdl.so.2 => /lib/arm-linux-gnueabihf/libdl.so.2 (0xb6afe000)
libslang.so.2 => /lib/arm-linux-gnueabihf/libslang.so.2 (0xb68ec000)
libX11.so.6 => /lib/arm-linux-gnueabihf/libX11.so.6 (0xb67c6000)
libgpm.so.2 => /lib/arm-linux-gnueabihf/libgpm.so.2 (0xb67b0000)
libxcb.so.1 => /lib/arm-linux-gnueabihf/libxcb.so.1 (0xb677f000)
libXau.so.6 => /lib/arm-linux-gnueabihf/libXau.so.6 (0xb676c000)
libXdmcp.so.6 => /lib/arm-linux-gnueabihf/libXdmcp.so.6 (0xb6757000)
libbsd.so.0 => /lib/arm-linux-gnueabihf/libbsd.so.0 (0xb6735000)
libmd.so.0 => /lib/arm-linux-gnueabihf/libmd.so.0 (0xb671a000)
Running ldconfig doesn't seem to change anything either.
Okay I got it fixed. Here's what I did:
su # run as root
# Remove all traces of libgphoto2 on the system
apt remove libgphoto2-dev
apt purge libgphoto2-dev
find / | grep libgphoto | xargs -I {} rm -rf {}
apt install libgphoto2-dev --reinstall
# Notice the following warnings
# dpkg: warning: files list file for package 'libgphoto2-l10n' missing; assuming package has no files currently installed
# dpkg: warning: files list file for package 'libgphoto2-6:armhf' missing; assuming package has no files currently installed
# dpkg: warning: files list file for package 'libgphoto2-port12:armhf' missing; assuming package has no files currently installed
# install missing packages
apt install libgphoto2-l10n libgphoto2-6 libgphoto2-port12
# Test if it's working
gphoto2 --auto-detect
# what do ya know?
# Model Port
# ----------------------------------------------------------
# Nikon D3 (PTP mode) usb:001,003
rm -rf / | grep libgphoto | xargs -I {} rm -rf {}
@richbai90 is this supposed to erase your main partition or what? 😅
Lol! Yeah I guess so 😬. I fixed it in case someone opts to copy/paste without checking first lol. Thanks for the catch.
@richbai90 is this supposed to erase your main partition or what? 😅
I have two questions:
libgphoto2-port12
package, and I am interested about that.I have two questions:
- What operating system ist that? It ships a separate
libgphoto2-port12
package, and I am interested about that.
Rasbian
- Have you compiled a newer libgphoto2 source, and installed it by just overwriting the files the operating system package ships with?
I haven't tried just straight overwriting, I used the configure prefix option with make install.
I have two questions:
- What operating system ist that? It ships a separate
libgphoto2-port12
package, and I am interested about that.Rasbian
- Have you compiled a newer libgphoto2 source, and installed it by just overwriting the files the operating system package ships with?
I haven't tried just straight overwriting, I used the configure prefix option with make install.
Well, building and installing libgphoto2 with configure --prefix=/usr && make && sudo make install
is straight overwriting, and would explain your above gphoto2 --version
output showing 2.5.27 for gphoto2, 2.5.29.1 for libgphoto2, and 0.12.1 for libgphoto2_port.
Just trying to understand what (might have) happened.
Describe the bug
Not really a bug but I don't know where to get support specifically for
libgphoto2
. If I am in the wrong place, please direct me to the correct one.I am faced with the sudden inability to run a program compiled with libgphoto2. The build succeeds without any errors, but reports
Error Loading a Library
This happens with code that was working previously, and even example code from the repo. It started after I attempted to compile the library from source with debug flags so I could step through and understand the internals of the library better. Even after removing the library and reinstalling the version from the package manager ( apt : libgphoto2-dev/stable ) I am faced with the same error. Telling is the fact that if I runprint-camera-list idlist
I get an empty response. I think for some reason the camera libraries aren't linked correctly to the main library, but that's just my hunchName the camera Camera is not detected by gphoto2 either, which only just started happening with this same issue.
lsusb
reports that the camera is connected.Bus 001 Device 003: ID 04b0:041c Nikon Corp. NIKON DSC D3
libgphoto2 and gphoto2 version
I tried compiling all supported camera libraries to see if this would correct the issue. It did not.
To Reproduce Not sure, but try first by compiling from source and removing the installed libraries via the package manager, and then any remaining instances by hand (
find / | grep libgphoto | xargs -I {} sudo rm -rf {}
)When reproducing with the commandline tool, attach debugout using --debug --debug-logfile=debug.log if considered useful.