file command error for application/msword when checking mime type

If you updated your system and file command started to behave strangely when trying to determine file type for Microsoft Word, giving you  “ERROR: (null)” instead of “application/msword” here is a quick solution to fix it.

# Checkout source files
git clone https://github.com/glensc/file

# generate configure/make and stuff
cd file
libtoolize --force
aclocal
autoheader
automake --force-missing --add-missing
autoconf

# Usual configure/make and checkinstall
./configure
make
sudo checkinstall --pkgname=file --pkgversion "5.11" --backup=no --fstran

# ldconfig
sudo ldconfig -v

Your email address will not be published. Required fields are marked *