Raspbian Jessie: Cannot mount NTFS external harddrive anymore after 'apt-get upgrade' (fuse device is missing) - raspberry-pi

After I used apt-get upgrade earlier today, my Raspberry Pi (Raspbian Jessie) stopped being able to automount my external harddrives anymore. Automounting worked perfectly fine before apt-get upgrade, but now I can't even manually mount my external HDDs anymore.
This is the error message I received:
pi#raspberrypi:~ $ sudo mount /dev/sda1 /mnt
modprobe: ERROR: ../libkmod/libkmod.c:557 kmod_search_moddep() could not open moddep file '/lib/modules/4.4.26-v7+/modules.dep.bin'
ntfs-3g-mount: fuse device is missing, try 'modprobe fuse' as root
'modprobe fuse' gives me the same error message:
modprobe: ERROR: ../libkmod/libkmod.c:557 kmod_search_moddep() could not open moddep file '/lib/modules/4.4.26-v7+/modules.dep.bin'
I reinstalled the kernel and bootloader using this command:
sudo apt-get install --reinstall raspberrypi-bootloader raspberrypi-kernel
But this did not help.
From reading other forum posts, it may look like my kernel and fuse might not be compatible - but how would that have happened? I feel I'm a bit out of my depth here.
Some forum posts suggested a restart will help, but this didn't solve the issue for me.
Alternatively, I also found a post from drownboat on Reddit from two years ago that looks promising - but to be honest, I have no idea if this is just another red herring or if this is indeed the problem I'm facing. In any case, I'm not sure what exactly/how drownboat did it:
I suspect that what is happening is that updates to the kernel and
grub config are being written to the /boot folder, but not onto the
boot device. This has caused the modules and the kernel to go out of
sync. [...]
I fixed it by adding /boot back to /etc/fstab, rebooting to another kernel where the modules were still working, thus mounting /boot, and finally reinstalling apt-get install --reinstall linux-image-3.16.0-4-amd64.
I would greatly appreciate any help!
Some more info:
uname -a
Linux raspberrypi 4.4.26-v7+ #915 SMP Thu Oct 20 17:08:44 BST 2016
armv7l GNU/Linux
dpkg -s fuse
Status: install ok installed
Priority: optional
Section: utils
Installed-Size: 103
Maintainer: Laszlo Boszormenyi (GCS)
Architecture: armhf
Version: 2.9.3-15+deb8u2
Depends: libc6 (>= 2.4), libfuse2 (= 2.9.3-15+deb8u2), adduser, mount (>= 2.19.1), sed (>= 4), udev | makedev
Conffiles:
/etc/fuse.conf 298587592c8444196833f317def414f2
Description: Filesystem in Userspace
Filesystem in Userspace (FUSE) is a simple interface for userspace programs to
export a virtual filesystem to the Linux kernel. It also aims to provide a
secure method for non privileged users to create and mount their own filesystem
implementations.
Homepage: http://fuse.sourceforge.net/

I FOUND THE SOLUTION (see further below for details)! It turned out that the boot partition was not mounted and the operating system reverted to the old kernel before the apt-get upgrade. So I just had to make sure that /boot was automounted at startup so the correct kernel was used.
Further steps in my error analysis ():
OK so I managed to fix the issue myself. It really just turned out that the /boot partition was not mounted and thus my Raspberry Pi reverted to the old kernel instead of the fancy new one that came with apt-get upgrade.
I found the problem by using uname -r, which gave me '4.9.35-v7+' as an answer. This was strange because the original error message had a different version number:
modprobe: ERROR: ../libkmod/libkmod.c:557 kmod_search_moddep() could
not open moddep file '/lib/modules/4.4.26-v7+/modules.dep.bin'
(My emphasis)
When I navigated to /lib/modules using cd /lib/modules I also saw this:
pi#raspberrypi:/lib/modules $ ls
4.9.35+ 4.9.35-v7+
So the error message about a fuse device missing really seemed to have something to do with a mismatch of kernel and fuse versions. The discrepancy between version numbers led me to believe that the wrong kernel was being used (like drownboat also stated in their Reddit post two years ago).
This is how I fixed the problem (SOLUTION):
sudo nano /etc/fstab/
Then I added the following lines to fstab:
# automount /boot partition at startup
/dev/mmcblk0p6 /boot vfat defaults 0 2
After rebooting, I used sudo raspi-config to check if the boot partition was mounted properly (raspi-config will only let you enter its menu if the partition is mounted, otherwise it will tell you that you need to mount the boot partition first).
Then I ran sudo apt-get install --reinstall raspberrypi-bootloader raspberrypi-kernel again to doubly ensure that the latest kernel was installed on the boot partition too - but I don't know if this was a crucial step.
Finally, after another restart, I was able to mount/automount my external harddrives again.
Hope this helps anyone else out there having the same issue as me! :)

In my situation, the solution is pretty simple.
I run apt update and apt upgrade -y and then apt install ntfs-3g, after these, I try to mount the disk and met this error.
The solution is just reboot
After reboot, try to mount again, and thing worked well.

I had the same issue trying to get Open Media Vault working. There were missing or unmatched kernel files, outdated libraries etc. I ran the updates in the link below and got it working.
Update system's package list
sudo apt-get update
upgrade all installed packages to their latest versions:
sudo apt-get dist-upgrade
https://www.raspberrypi.org/documentation/raspbian/updating.md

I had this problem trying to mount a FAT32 USB on Buster Lite with
pmount /dev/disk/by-label/<my-usb-label>
The messages implied the system was trying to mount an ntfs device. 'NTFS signature missing' etc.
Before trying anything clever, I tried #Kenneth's suggestion of a reboot. It fixed the problem.
Worrying to see Linux behaving like Windows 8-{

Crash after kernel upgrading
apt-get update & dist-upgrade
impossible to mount ntfs usb disk
modprobe: FATAL: Module fuse not found in directory /lib/modules/5.15.87-v7+
ntfs-3g-mount: fuse device is missing, try 'modprobe fuse' as root
Thanks a lot for this workaround :
sudo apt-get install --reinstall raspberrypi-bootloader raspberrypi-kernel

Related

gflag.h not found on Ubuntu Ubuntu 22.04.1 LTS

I want to install wcs2kml and this seems to require gflags.h
Installing
sudo apt-get install libgflags2 libgflags-dev
doesn't work - libgflags2 seems obsolete, using libgflags2.2 instead finishes cleanly, but then during ./configure in the wcs2kml directory I get
checking for google/gflags.h... no
configure: error: cannot find gflags.h
Can anyone help explain what I need to do to have gflags.h be present on my system?

dpkg: why does instdir need admindir parameter on Mint 21

We create a Debian package of our application using CPack which can be installed on Linux Mint 19 like this:
$ sudo dpkg -i --instdir=/opt myapp.deb
With Linux Mint 21 the (installed) dependencies are not resolved:
dpkg: dependency problems prevent configuration of myapp:
myapp depends on libsqlite3-0 however:
Package libsqlite3-0 is not installed.
...
After reading the dpkg man page I set the admindir parameter and the installation succeeds:
$ sudo dpkg -i --instdir=/opt --admindir=/var/lib/dpkg/ myapp.deb
If I do not set admindir to /var/lib/dpkg/ then the right environment is not found. Why is that? And why did it work without admindir on Mint 19? Using parameter root does not help because it expects the administrative directory to be a subdirectory of the instdir.
This is a bug, which seems I introduced in dpkg 1.21.0. I'll be preparing a fix and regression tests for dpkg 1.21.10 which should hit Debian unstable in few days I guess. For Mint, which seems to be based on Ubuntu, you'd need to request the Ubuntu people to consider including that fix once it's in Debian unstable, and then the Mint people to do the same. Otherwise you can specify both options as a workaround for now. :/
Please feel free to report this kind of problems upstream in the bug tracking system next time, I just happened to see this by accident today. :)

The db2prereqcheck utility could not find the library file libnuma.so.1. on ubi7/ubi:latest docker image

i have a problem to install numactl-libs (or libnuma.so.1) on a ubi7/ubi:latest Docker image to run the db2 installation.
I have built a Docker image for db2 and wanted to test whether the DB2 installation runs successfully.
However, I get the following error message:
Requirement not matched for DB2 database "Server" . Version: "11.1.4.6".
Summary of prerequisites that are not met on the current system:
DBT3609E The db2prereqcheck utility could not find the library file libnuma.so.1.
The image has ubi7/ubi:latest as base image and the following libraries are also installed as follows:
RUN yum install -y libaio numactl-libs libpam.so.0 binutils gcc gcc-c++ ksh numactl && yum clean all
All libraries are successfully installed except numactl-libs (or libnuma.so.1?).
Note: a manual installation of numactl-libs worked without problems and thus the DB2 installation was successful:
ADD http://mirror.centos.org/centos/7/os/x86_64/Packages/numactl-libs-2.0.12-5.el7.x86_64.rpm numactl.rpm
RUN rpm -i numactl.rpm
However, I would like the installation of numactl-libs to be done automatically with e.g. the command yum install -y numactl-libs or another equivalent command.
Unfortunately, an attempt with the command yum install -y libnuma.so.1 or yum install -y libnuma.so.* did not change anything and the same error message was displayed.
Can you please help me? I would be very grateful
Note: in my case a 64-bit version is used.
Update:
Unfortunately even trying to install libnuma-dev and libnuma1 has not changed anything and the error message is still the same .
The output of yum provides libnuma.so.1 is:
Loaded plugins: ovl, product-id, search-disabled-repos,
subscription-manager This system is not registered with an
entitlement server. You can use subscription-manager to register.
No matches found
It seems that the problem is that numactl-libs cannot be installed:
The output of yum install numactl-libs is:
Loaded plugins: ovl, product-id, search-disabled-repos, subscription-manager.
This system is not registered with an entitlement server. You can use subscription-manager to register.
No package numactl-libs available.
Solution:
The problem was fixed and numactl-libs could finally be installed:
After I created a Red Hat user account and registered and subscribed to a system for the Red Hat Customer Portal with Red Hat Subscription Manager, numactl-libs installed without any problems.
To register and subscribe to a system for the Red Hat Customer Portal with Red Hat Subscription Manager.
See the following link: (https://access.redhat.com/solutions/253273)
I added the following line in my Dockerfile before the command yum install numactl-libs:
subscription-manager register --username=[USER_NAME] --password=[PASSWORD] --auto-attach
After these steps the DB2 installation ran without problems.
Thank you very much for your tips and help!

Pacman transaction error

Today I installed Arch Linux onto my Raspberry Pi and as one of my first steps I tried to install some new packages. However, I always get the same error if I try to install a package:
error: failed to commit transaction (wrong or NULL argument passed)
Errors occurred, no packages were upgraded.
I checked some other repository servers, but it still does not work. Here is my current mirrorlist:
#
# Arch Linux ARM repository mirrorlist
# Generated on 2013-06-13
#
## Geo-IP based mirror selection and load balancing
# Server = http://mirror.archlinuxarm.org/armv6h/$repo
## Berlin
Server = http://de.mirror.archlinuxarm.org/armv6h/$repo
Then I tried to clear my cache:
pacman -Sc
rm /var/cache/pacman/pkg/*.part
pacman -Syyu
It did not work! Any ideas?
First, make sure your system is up-to-date with "sudo pacman -Syu" Then you can try selecting new mirrors and "sudo pacman -Syy" to refresh your mirrorlist. It's good to have a main mirror, and a few backups.
Try checking the wiki:
Mirrors - ArchWiki
Also check Mirrors status page:
Mirror Status
Just as a side note, I couldn't find your mirror in the list of current mirrors, so there could be your problem.
If all else fails, I'd take it to the arch forums, but just a warning, you're going to have to provide a lot more information, packages you're trying to install, and possible the pacman jorunal error messages, etc...
Try this in your terminal
sudo pacman-mirrors --country all --api --protocols all --set-branch stable && sudo pacman -Syyu

What does "The APR based Apache Tomcat Native library was not found" mean?

I am using Tomcat 7 in Eclipse on Windows. When starting Tomcat, I am getting the following info message:
The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path
What does this mean and how can I provide the APR library?
It means exactly what it says: "The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path"
The library referred to is bundled into an OS specific dll (tcnative-1.dll) loaded via JNI. It allows tomcat to use OS functionalities not provided in the Java Runtime (such as sendfile, epoll, OpenSSL, system status, etc.). Tomcat will run just fine without it, but for some use cases, it will be faster with the native libraries.
If you really want it, download the tcnative-1.dll (or libtcnative.so for Linux) and put it in the bin folder, and add a system property to the launch configuration of the tomcat server in eclipse.
-Djava.library.path=c:\dev\tomcat\bin
Unless you're running a production server, don't worry about this message. This is a library which is used to improve performance (on production systems). From Apache Portable Runtime (APR) based Native library for Tomcat:
Tomcat can use the Apache Portable Runtime to provide superior
scalability, performance, and better integration with native server
technologies. The Apache Portable Runtime is a highly portable library
that is at the heart of Apache HTTP Server 2.x. APR has many uses,
including access to advanced IO functionality (such as sendfile, epoll
and OpenSSL), OS level functionality (random number generation, system
status, etc), and native process handling (shared memory, NT pipes and
Unix sockets).
On RHEL Linux just issue:
yum install tomcat-native.x86_64
/Note:depending on Your architecture 64bit or 32bit package may have different extension/
That is all. After that You will find in the log file next informational message:
INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
All operations will be noticeably faster than before.
Installation the native library on Ubuntu server with:
sudo apt-get install libtcnative-1
If that does not work tomcat-native needs to be installed
Install Oracle java7:
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer
sudo apt-get install oracle-java7-set-default
Install tomcat apr:
wget http://apache.mirror.anlx.net//apr/apr-1.5.0.tar.gz
tar zxvf apr-1.5.0.tar.gz
rm apr-1.5.0.tar.gz
cd apr-1.5.0
sudo ./configure
sudo make
sudo make install
export LD_LIBRARY_PATH='$LD_LIBRARY_PATH:/usr/local/apr/lib'
Install tomcat tomcat-native:
wget http://mirrors.ukfast.co.uk/sites/ftp.apache.org//tomcat/tomcat-connectors/native/1.1.29/source/tomcat-native-1.1.29-src.tar.gz
tar zxvf tomcat-native-1.1.29-src.tar.gz
rm tomcat-native-1.1.29-src.tar.gz
cd tomcat-native-1.1.29-src/jni/native
JAVA_HOME=/usr/lib/jvm/java-7-oracle
sudo ./configure --with-apr=/usr/local/apr --with-java-home=$JAVA_HOME
sudo make
sudo make install
I just went through this and configured it with the following:
Ubuntu 16.04
Tomcat 8.5.9
Apache2.4.25
APR 1.5.2
Tomcat-native 1.2.10
Java 8
These are the steps i used based on the older posts here:
Install package
sudo apt-get update
sudo apt-get install libtcnative-1
Verify these packages are installed
sudo apt-get install make
sudo apt-get install gcc
sudo apt-get install openssl
Install package
sudo apt-get install libssl-dev
Install and compile Apache APR
cd /opt/tomcat/bin
sudo wget http://apache.mirror.anlx.net//apr/apr-1.5.2.tar.gz
sudo tar -xzvf apr-1.5.2.tar.gz
cd apr-1.5.2
sudo ./configure
sudo make
sudo make install
verify installation
cd /usr/local/apr/lib/
ls
you should see the compiled file as
libapr-1.la
Download and install Tomcat Native source package
cd /opt/tomcat/bin
sudo wget https://archive.apache.org/dist/tomcat/tomcat-connectors/native/1.2.10/source/tomcat-native-1.2.10-src.tar.gz
sudo tar -xzvf tomcat-native-1.2.10-src.tar.gz
cd tomcat-native-1.2.10-src/native
verify JAVA_HOME
sudo pico ~/.bashrc
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
source ~/.bashrc
sudo ./configure --with-apr=/usr/local/apr --with-java-home=$JAVA_HOME
sudo make
sudo make install
Edit the /opt/tomcat/bin/setenv.sh file with following line:
sudo pico /opt/tomcat/bin/setenv.sh
export LD_LIBRARY_PATH='$LD_LIBRARY_PATH:/usr/local/apr/lib'
restart tomcat
sudo service tomcat restart
On Mac OS X:
$ brew install tomcat-native
==> tomcat-native
In order for tomcat's APR lifecycle listener to find this library, you'll
need to add it to java.library.path. This can be done by adding this line
to $CATALINA_HOME/bin/setenv.sh
CATALINA_OPTS="$CATALINA_OPTS -Djava.library.path=/usr/local/opt/tomcat-native/lib"
If $CATALINA_HOME/bin/setenv.sh doesn't exist, create it and make it executable.
Then add it to the eclipse's tomcat arguments (double-click Server > Open Launch Configuration > Arguments tab > VM arguments)
-Djava.library.path=/usr/local/opt/tomcat-native/lib
on debian 8 I fix it with installing libapr1-dev:
apt-get install libtcnative-1 libapr1-dev
Had this problem as well. If you do have the libraries, but still have this error, it may be a configuration error. Your server.xml may be missing the following line:
<Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
(Alternatively, it may be commented out). This <Listener>, like other listeners is a child of the top-level <Server>.
Without the <Listener> line, there's no attempt to load the APR library, so LD_LIBRARY_PATH and -Djava.library.path= settings are ignored.
I had this issue upgrading from Java 8 to 11. After adding this dependency, my app launched without issue:
<dependency>
<groupId>org.javassist</groupId>
<artifactId>javassist</artifactId>
<version>3.25.0-GA</version>
</dependency>
I had the same problem when tomсat could not find the class. Try to view other log files. Sometimes No class def found error appears in different log files:
tomcat8-stdout
tomcat8-stderr
localhost
If you don't have Tomcat Native library install it with:
sudo apt-get install libtcnative-1
and if it's still there an old version upgrade it with:
sudo apt-get upgrade libtcnative-1
My problem was in add some library from tomcat to eclipse class path i just going to
eclipse click right to project and going to debug configuration -> classpath -> Add External JARs add all jars files from apache-tomcat-7.0.35\bin this was my problem and it's worked for me .
For future readers:
I had faced this issue myself when trying to run a Spring Boot application in Spring STS. This issue didn't resurface initially. I was able to work on my project without any issues for quite some time until one fine day I started getting this particular error.
From what I am able to recall I had not made any configuration changes to my project and neither changed the Java/Tomcat version being used.
None of the discussions/suggestions regarding installing the tomcat native library made any sense to me since the project was already working fine before.
SOLUTION that worked for me:
So lastly I though of trying to delete and reimport my project.
I deleted my project from Spring STS, restarted the Spring STS and then reimported the project. It worked like a charm and never faced the issue ever since.
You may also try deleting any IDE generated files/folders(if there are any) in your project, before restarting the IDE and reimporting the project.
I still happen to work on this project from time to time and haven't faced the issue as of now. My current development IDE is IntelliJ.
I'm not sure if the error was IDE specific.