Fix Banana Pro error: command failed to execute correctly in Arch Linux

I am a big fan of Arch Linux and I use it everywhere - as my main OS, at all my computers and even on SoCs like Banana Pro. Recently I installed the Arch Linux image on my Banana Pro and faced an issue that every time I would install a package with pacman, it produced the following error:

error: command failed to execute correctly

Here is a fix to get rid of this message.
The issue is not specific to the Banana Pro board or to ARM Linux. It can happen even in the desktop (x86/x64) version of Arch Linux. It is caused by an improperly built image.

The issue is related to the "install-info" command. For some reason, the following file is empty:

/usr/share/info/dir

It is a text file and it should contain information about installed apps and packages. But the Banana Pro Arch Linux image comes with this file empty, so the "install-info" command fails.

It is very easy to fix this issue. It is possible to regenerate the dir file using the following shell script:

#!/bin/sh
rm /usr/share/info/dir
for j in $( { for i in /usr/share/info/*.info /usr/share/info/*.gz; do echo "$i" | sed -r 's/-([0-9]+)\.gz$/\.gz/g'; done; } | uniq) ; do install-info "$j" /usr/share/info/dir; done

Save it as "fix.sh" file and run from root as follows:

# sh ./fix.sh

This will fix the issue and you will be able to maintain your packages properly.

That's it.

Support us

Winaero greatly relies on your support. You can help the site keep bringing you interesting and useful content and software by using these options:

If you like this article, please share it using the buttons below. It won't take a lot from you, but it will help us grow. Thanks for your support!

Author: Sergey Tkachenko

Sergey Tkachenko is a software developer who started Winaero back in 2011. On this blog, Sergey is writing about everything connected to Microsoft, Windows and popular software. Follow him on Telegram, Twitter, and YouTube.

Leave a Reply

Your email address will not be published.

Exit mobile version
Using Telegram? Subscribe to the blog channel!
Hello. Add your message here.