1

I recently installed Ubuntu 16.10 and was looking to install MySQL via sudo apt mysql-server mysql-client when I received the error "mysqld: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory." I discovered, however, that libaio1 had been installed via apt and the libaio.so.1 file existed in /lib/x86_64-linux-gnu along with libaio.so.1.0.1, as well as /media/ubuntu/casper-rw/upper/lib/x86_64-linux-gnu. I've purged the MySQL files and databases and retried with no success. How do I properly install MySQL? Thanks!

  • Trying to install MariaDB from mariadb-server also produced an error, 'trying to overwrite '/usr/share/mysql/charsets/Index.xml', which is also in package mysql-common 5.7.16-1ubuntu16.04.' – Alan Adams Oct 23 '16 at 16:25
  • Now, after purging every trace of Mariadb and MySQL the Mariadb install is just saying 'subprocess installed post-installation script returned error exit status 127' and the MySQL install is producing the same error. – Alan Adams Oct 23 '16 at 16:40
  • Same error installing percona-server: 'trying to overwrite '/usr/share/mysql/charsets/Index.xml', which is also in package mysql-common 5.7.16-1ubuntu16.04.' – Davide Nov 21 '16 at 16:04
0

Try starting over utilizing a "LAMP" tutorial to guide you. The sources below pertain to Ubuntu 16.04. There may now be new posts for Ubuntu 16.10.

LAMP Server is a collection of open source software used to create a web server. The collection consists of:

Linux – the operating system
Apache server – the server
MySQL – the database system
PHP – the programming language

Quote above from: SudoJuice

To install the default LAMP stack in Ubuntu 10.04 and above
Install Apache, MySQL, PHP (LAMP) stack on Ubuntu 16.04
Install Lamp Server on Ubuntu

  • Unfortunately, installing through the LAMP metapackage causes the exact same error, plus installing MySQL 5.6 through a deb package produces the same error as well. Where is this libaio.so.1 supposed to be located? – Alan Adams Oct 23 '16 at 15:22
  • Going through the Ubuntu packages, the libaio.so.1 file has been installed in the correct location, which hasn't changed across other distros. Making an i386 folder and moving the files in there doesn't help, chmoding with 755 and 777 doesn't help. – Alan Adams Oct 23 '16 at 15:35
  • I have the same problem. I'm on i386 on a live ubuntu system. both libaio1 and libaio-dev are installed. – miller the gorilla Oct 23 '16 at 17:52
  • Try looking here: software installation - How do I install libaio? - Ask Ubuntu: askubuntu.com/questions/227791/how-do-i-install-libaio – Steve R. Oct 24 '16 at 23:26
  • Here is another possible problem/solution: stackoverflow.com/questions/10619298/… – Steve R. Oct 24 '16 at 23:34
0

The issue I was having wasn't a libaio library error but an apparmor error. The mysqld profile in Ubuntu's apparmor was too restrictive. I disabled apparmor's MySQLd profile using the tutorial here (http://www.cyberciti.biz/faq/ubuntu-linux-howto-disable-apparmor-commands/) and was able to successfully install and use the mysql-server! Thanks for all the help guys, and sorry I wasn't more clear on the issue.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.