Ubuntu 8.04 - Installed Mysql > Errors with Apparmor

I'm setting up a fresh Ubuntu 8.04 with LAMP.

My last task was installing mysql-server mysql-client.

During installation I got the following errors:

ls: cannot access /sys/module/apparmor: No such file or directory
ls: cannot access /sys/module/apparmor: No such file or directory
ls: cannot access /sys/module/apparmor: No such file or directory
/etc/init.d/apparmor: 119: /sbin/modprobe: not found
$Loading AppArmor module: Failed.

I get the same errors when rebooting also.

Any ideas on how to fix this? I can't seem to find any similar problems while searching.

3 Replies

Seems to be a problem with AppArmor. It's a program that's supposed to enhance security, but sometimes it causes obscure errors. (Not that I know much about what it does… but I've seen tutorials written by competent people where they suggest that you turn off AppArmor in Ubuntu Hardy.)

Try running the following commands:

/etc/init.d/apparmor stop
update-rc.d -f apparmor remove

The first line stops AppArmor and the second line prevents it from being started the next time you reboot.

Or maybe you can just apt-get remove apparmor. And reboot. (You don't really need to reboot because this isn't Windows, but just to make sure that the error doesn't appear when rebooting…)

Hope this helps,

This is not really a problem with AppArmor itself.

If your Linode is running under UML, you are provided with a monolithic kernel and you cannot install kernel modules.

If your Linode is running under Xen, you can insert kernel modules but you will need to make sure that they were built against the same library versions as the Linode kernel / build them yourself using the correct libraries (not necessarily the ones in your distro) and install the module tools (/sbin/modprobe and the like).

hybinet's solution is easiest - just disable Apparmor.

Thanks for the replies.


It turns out that aptitude installs recommended packages automatically by default.

apparmor was a recommended package for mysql-server, so it wasn't actually needed. I removed apparmor and changed the setting in aptitude to not automatically install recommended packages.


Please enter an answer

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct