TransWikia.com

Unattended phpmyadmin install end up throwing errors

Ask Ubuntu Asked on December 6, 2021

I’m trying to install phpmyadmin preseeding the information via the debconf-set-selection command on my Ubuntu 12.04LTS

That’s the bit I’m using

echo phpmyadmin phpmyadmin/dbconfig-install boolean true | debconf-set-selections
echo phpmyadmin phpmyadmin/app-password-confirm password pwd | debconf-set-selections
echo phpmyadmin phpmyadmin/mysql/admin-pass password pwd| debconf-set-selections
echo phpmyadmin phpmyadmin/mysql/app-pass password pwd| debconf-set-selections
echo phpmyadmin phpmyadmin/reconfigure-webserver multiselect apache2 | debconf-set-selections
echo phpmyadmin phpmyadmin/upgrade-backup boolean true | debconf-set-selections

But I always end up getting the following error message

error: Cannot find a question for phpmyadmin/dbconfig-install
error: Cannot find a question for phpmyadmin/app-password-confirm
error: Cannot find a question for phpmyadmin/mysql/admin-pass
error: Cannot find a question for phpmyadmin/mysql/app-pass
error: Cannot find a question for phpmyadmin/upgrade-backup

if I attempt to run the command using sudo from the shell I get the following message

debconf: DbDriver "passwords" warning: could not open /var/cache/debconf/passwords.dat: Permission denied

However, I was once able to get this installed. So what could be the cause?

Thanks
Andrea

3 Answers

When in doubt, add more sudos ... this is what worked for my unattended MySQL install:

sudo echo "mysql-community-server mysql-community-server/root-pass password ${DB_PASSWORD_ROOT}" | sudo debconf-set-selections

As with the OP, my scripts previously ran fine as root without any sudo prefixes at all. So I'm not sure why in certain cases or environments this matters:

https://github.com/littlebizzy/slickstack/blob/master/ss-install-mysql.txt

By the way, thanks to those who shared this snippet:

sudo /usr/share/debconf/fix_db.pl ... intriguing if nothing else!

Answered by Jesse Nickles on December 6, 2021

Running: sudo /usr/share/debconf/fix_db.pl can fix it.

Remember to install mysql server, because you need a connection to the socket. Unattended is also:

echo "mysql-server mysql-server/root_password password root" | sudo debconf-set-selections
echo "mysql-server mysql-server/root_password_again password root" | sudo debconf-set-selections

apt-get install mysql-client mysql-server -y

With high privileges, the final installation would be:

echo 'phpmyadmin phpmyadmin/dbconfig-install boolean true' | sudo debconf-set-selections
echo 'phpmyadmin phpmyadmin/app-password-confirm password root' | sudo debconf-set-selections
echo 'phpmyadmin phpmyadmin/mysql/admin-pass password root' | sudo debconf-set-selections
echo 'phpmyadmin phpmyadmin/mysql/app-pass password root' | sudo debconf-set-selections
echo 'phpmyadmin phpmyadmin/reconfigure-webserver multiselect apache2' | sudo debconf-set-selections
sudo apt-get install phpmyadmin -y

With that everything works very well.

Answered by Antonio Moreno on December 6, 2021

This may be related to a debconf bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=487300

Your debconf database could have got corrupted.

Running /usr/share/debconf/fix_db.pl can fix it.

I hope it works for you.

Answered by attilakreiner on December 6, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP