How to fix AppArmor `could not open` error when installing php+mysql?
I want to install php5-imap php5-ldap php5-curl
sudo apt-get install php5-imap php5-ldap php5-curl
I get this error:
AppArmor parser error for /etc/apparmor.d/usr.sbin.mysqld in /etc/apparmor.d/usr.sbin.mysqld at line 9: Could not open 'abstractions/mysql'
How can this problem be resolved?
mysql apparmor
add a comment |
I want to install php5-imap php5-ldap php5-curl
sudo apt-get install php5-imap php5-ldap php5-curl
I get this error:
AppArmor parser error for /etc/apparmor.d/usr.sbin.mysqld in /etc/apparmor.d/usr.sbin.mysqld at line 9: Could not open 'abstractions/mysql'
How can this problem be resolved?
mysql apparmor
add a comment |
I want to install php5-imap php5-ldap php5-curl
sudo apt-get install php5-imap php5-ldap php5-curl
I get this error:
AppArmor parser error for /etc/apparmor.d/usr.sbin.mysqld in /etc/apparmor.d/usr.sbin.mysqld at line 9: Could not open 'abstractions/mysql'
How can this problem be resolved?
mysql apparmor
I want to install php5-imap php5-ldap php5-curl
sudo apt-get install php5-imap php5-ldap php5-curl
I get this error:
AppArmor parser error for /etc/apparmor.d/usr.sbin.mysqld in /etc/apparmor.d/usr.sbin.mysqld at line 9: Could not open 'abstractions/mysql'
How can this problem be resolved?
mysql apparmor
mysql apparmor
edited Feb 7 '13 at 12:37
user25656
asked Feb 7 '13 at 11:04
Ellouze Anis Ellouze Anis
164126
164126
add a comment |
add a comment |
3 Answers
3
active
oldest
votes
See if the Ubuntu wiki helps : https://wiki.ubuntu.com/DebuggingApparmor
Specifically,
When debugging, it may also be useful
to put apparmor into 'complain' mode.
This will allow your application to
function normally while apparmor
reports accesses that are not in the
profile. To enable 'complain' mode,
use:
sudo aa-complain /path/to/bin
where '/path/to/bin' is the absolute
path to the binary, as reported in the
'profile=...' portion of the 'audit'
entry. Eg:
sudo aa-complain /usr/sbin/slapd
To re-enable enforcing mode, use
'aa-enforce' instead:
sudo aa-enforce /path/to/bin
To disable a profile:
sudo touch /etc/apparmor.d/disable/path.to.bin
sudo apparmor_parser -R /etc/apparmor.d/path.to.bin
To disable a profile in Ubuntu 10.10 and earlier:
sudo touch /etc/apparmor.d/disable/path.to.bin sudo apparmor_parser -R /etc/apparmor.d/path.to.bin
in 11.04 and later:
sudo aa-disable /etc/apparmor.d/path.to.bin
To disable all of AppArmor
for testing purposes, boot withapparmor=0
on the kernel command
line.
add a comment |
It is an old question, but maybe someone will find it useful.
Sometimes pieces of application are split in separate packages. Same goes for apparmor profiles. They are split in packages apparmor-profiles
and apparmor-profiles-extra
. So, if you have some profiles missing, install apparmor-profiles-extra
.
add a comment |
You are missing the file abstractions/mysql. This happened to me when I tried to completely remove MySQL before reinstalling it. I fixed this issue by replacing the file with a copy from another server. The contents of my file looks something like this:
# ------------------------------------------------------------------
#
# Copyright (C) 2002-2006 Novell/SUSE
# Copyright (C) 2013 Christian Boltz
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of version 2 of the GNU General Public
# License published by the Free Software Foundation.
#
# ------------------------------------------------------------------
/var/lib/mysql{,d}/mysql{,d}.sock rw,
/{var/,}run/mysql{,d}/mysql{,d}.sock rw,
/usr/share/{mysql,mysql-community-server,mariadb}/charsets/ r,
/usr/share/{mysql,mysql-community-server,mariadb}/charsets/*.xml r,
Try creating the file and adding the above contents with:
sudo nano /etc/apparmor.d/abstractions/mysql
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f252340%2fhow-to-fix-apparmor-could-not-open-error-when-installing-phpmysql%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
See if the Ubuntu wiki helps : https://wiki.ubuntu.com/DebuggingApparmor
Specifically,
When debugging, it may also be useful
to put apparmor into 'complain' mode.
This will allow your application to
function normally while apparmor
reports accesses that are not in the
profile. To enable 'complain' mode,
use:
sudo aa-complain /path/to/bin
where '/path/to/bin' is the absolute
path to the binary, as reported in the
'profile=...' portion of the 'audit'
entry. Eg:
sudo aa-complain /usr/sbin/slapd
To re-enable enforcing mode, use
'aa-enforce' instead:
sudo aa-enforce /path/to/bin
To disable a profile:
sudo touch /etc/apparmor.d/disable/path.to.bin
sudo apparmor_parser -R /etc/apparmor.d/path.to.bin
To disable a profile in Ubuntu 10.10 and earlier:
sudo touch /etc/apparmor.d/disable/path.to.bin sudo apparmor_parser -R /etc/apparmor.d/path.to.bin
in 11.04 and later:
sudo aa-disable /etc/apparmor.d/path.to.bin
To disable all of AppArmor
for testing purposes, boot withapparmor=0
on the kernel command
line.
add a comment |
See if the Ubuntu wiki helps : https://wiki.ubuntu.com/DebuggingApparmor
Specifically,
When debugging, it may also be useful
to put apparmor into 'complain' mode.
This will allow your application to
function normally while apparmor
reports accesses that are not in the
profile. To enable 'complain' mode,
use:
sudo aa-complain /path/to/bin
where '/path/to/bin' is the absolute
path to the binary, as reported in the
'profile=...' portion of the 'audit'
entry. Eg:
sudo aa-complain /usr/sbin/slapd
To re-enable enforcing mode, use
'aa-enforce' instead:
sudo aa-enforce /path/to/bin
To disable a profile:
sudo touch /etc/apparmor.d/disable/path.to.bin
sudo apparmor_parser -R /etc/apparmor.d/path.to.bin
To disable a profile in Ubuntu 10.10 and earlier:
sudo touch /etc/apparmor.d/disable/path.to.bin sudo apparmor_parser -R /etc/apparmor.d/path.to.bin
in 11.04 and later:
sudo aa-disable /etc/apparmor.d/path.to.bin
To disable all of AppArmor
for testing purposes, boot withapparmor=0
on the kernel command
line.
add a comment |
See if the Ubuntu wiki helps : https://wiki.ubuntu.com/DebuggingApparmor
Specifically,
When debugging, it may also be useful
to put apparmor into 'complain' mode.
This will allow your application to
function normally while apparmor
reports accesses that are not in the
profile. To enable 'complain' mode,
use:
sudo aa-complain /path/to/bin
where '/path/to/bin' is the absolute
path to the binary, as reported in the
'profile=...' portion of the 'audit'
entry. Eg:
sudo aa-complain /usr/sbin/slapd
To re-enable enforcing mode, use
'aa-enforce' instead:
sudo aa-enforce /path/to/bin
To disable a profile:
sudo touch /etc/apparmor.d/disable/path.to.bin
sudo apparmor_parser -R /etc/apparmor.d/path.to.bin
To disable a profile in Ubuntu 10.10 and earlier:
sudo touch /etc/apparmor.d/disable/path.to.bin sudo apparmor_parser -R /etc/apparmor.d/path.to.bin
in 11.04 and later:
sudo aa-disable /etc/apparmor.d/path.to.bin
To disable all of AppArmor
for testing purposes, boot withapparmor=0
on the kernel command
line.
See if the Ubuntu wiki helps : https://wiki.ubuntu.com/DebuggingApparmor
Specifically,
When debugging, it may also be useful
to put apparmor into 'complain' mode.
This will allow your application to
function normally while apparmor
reports accesses that are not in the
profile. To enable 'complain' mode,
use:
sudo aa-complain /path/to/bin
where '/path/to/bin' is the absolute
path to the binary, as reported in the
'profile=...' portion of the 'audit'
entry. Eg:
sudo aa-complain /usr/sbin/slapd
To re-enable enforcing mode, use
'aa-enforce' instead:
sudo aa-enforce /path/to/bin
To disable a profile:
sudo touch /etc/apparmor.d/disable/path.to.bin
sudo apparmor_parser -R /etc/apparmor.d/path.to.bin
To disable a profile in Ubuntu 10.10 and earlier:
sudo touch /etc/apparmor.d/disable/path.to.bin sudo apparmor_parser -R /etc/apparmor.d/path.to.bin
in 11.04 and later:
sudo aa-disable /etc/apparmor.d/path.to.bin
To disable all of AppArmor
for testing purposes, boot withapparmor=0
on the kernel command
line.
answered Feb 7 '13 at 23:47
belacquabelacqua
15.7k1472103
15.7k1472103
add a comment |
add a comment |
It is an old question, but maybe someone will find it useful.
Sometimes pieces of application are split in separate packages. Same goes for apparmor profiles. They are split in packages apparmor-profiles
and apparmor-profiles-extra
. So, if you have some profiles missing, install apparmor-profiles-extra
.
add a comment |
It is an old question, but maybe someone will find it useful.
Sometimes pieces of application are split in separate packages. Same goes for apparmor profiles. They are split in packages apparmor-profiles
and apparmor-profiles-extra
. So, if you have some profiles missing, install apparmor-profiles-extra
.
add a comment |
It is an old question, but maybe someone will find it useful.
Sometimes pieces of application are split in separate packages. Same goes for apparmor profiles. They are split in packages apparmor-profiles
and apparmor-profiles-extra
. So, if you have some profiles missing, install apparmor-profiles-extra
.
It is an old question, but maybe someone will find it useful.
Sometimes pieces of application are split in separate packages. Same goes for apparmor profiles. They are split in packages apparmor-profiles
and apparmor-profiles-extra
. So, if you have some profiles missing, install apparmor-profiles-extra
.
answered Jun 18 '18 at 8:02
SergeySergey
416
416
add a comment |
add a comment |
You are missing the file abstractions/mysql. This happened to me when I tried to completely remove MySQL before reinstalling it. I fixed this issue by replacing the file with a copy from another server. The contents of my file looks something like this:
# ------------------------------------------------------------------
#
# Copyright (C) 2002-2006 Novell/SUSE
# Copyright (C) 2013 Christian Boltz
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of version 2 of the GNU General Public
# License published by the Free Software Foundation.
#
# ------------------------------------------------------------------
/var/lib/mysql{,d}/mysql{,d}.sock rw,
/{var/,}run/mysql{,d}/mysql{,d}.sock rw,
/usr/share/{mysql,mysql-community-server,mariadb}/charsets/ r,
/usr/share/{mysql,mysql-community-server,mariadb}/charsets/*.xml r,
Try creating the file and adding the above contents with:
sudo nano /etc/apparmor.d/abstractions/mysql
add a comment |
You are missing the file abstractions/mysql. This happened to me when I tried to completely remove MySQL before reinstalling it. I fixed this issue by replacing the file with a copy from another server. The contents of my file looks something like this:
# ------------------------------------------------------------------
#
# Copyright (C) 2002-2006 Novell/SUSE
# Copyright (C) 2013 Christian Boltz
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of version 2 of the GNU General Public
# License published by the Free Software Foundation.
#
# ------------------------------------------------------------------
/var/lib/mysql{,d}/mysql{,d}.sock rw,
/{var/,}run/mysql{,d}/mysql{,d}.sock rw,
/usr/share/{mysql,mysql-community-server,mariadb}/charsets/ r,
/usr/share/{mysql,mysql-community-server,mariadb}/charsets/*.xml r,
Try creating the file and adding the above contents with:
sudo nano /etc/apparmor.d/abstractions/mysql
add a comment |
You are missing the file abstractions/mysql. This happened to me when I tried to completely remove MySQL before reinstalling it. I fixed this issue by replacing the file with a copy from another server. The contents of my file looks something like this:
# ------------------------------------------------------------------
#
# Copyright (C) 2002-2006 Novell/SUSE
# Copyright (C) 2013 Christian Boltz
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of version 2 of the GNU General Public
# License published by the Free Software Foundation.
#
# ------------------------------------------------------------------
/var/lib/mysql{,d}/mysql{,d}.sock rw,
/{var/,}run/mysql{,d}/mysql{,d}.sock rw,
/usr/share/{mysql,mysql-community-server,mariadb}/charsets/ r,
/usr/share/{mysql,mysql-community-server,mariadb}/charsets/*.xml r,
Try creating the file and adding the above contents with:
sudo nano /etc/apparmor.d/abstractions/mysql
You are missing the file abstractions/mysql. This happened to me when I tried to completely remove MySQL before reinstalling it. I fixed this issue by replacing the file with a copy from another server. The contents of my file looks something like this:
# ------------------------------------------------------------------
#
# Copyright (C) 2002-2006 Novell/SUSE
# Copyright (C) 2013 Christian Boltz
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of version 2 of the GNU General Public
# License published by the Free Software Foundation.
#
# ------------------------------------------------------------------
/var/lib/mysql{,d}/mysql{,d}.sock rw,
/{var/,}run/mysql{,d}/mysql{,d}.sock rw,
/usr/share/{mysql,mysql-community-server,mariadb}/charsets/ r,
/usr/share/{mysql,mysql-community-server,mariadb}/charsets/*.xml r,
Try creating the file and adding the above contents with:
sudo nano /etc/apparmor.d/abstractions/mysql
answered Dec 7 '18 at 14:43
user2395126user2395126
1011
1011
add a comment |
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f252340%2fhow-to-fix-apparmor-could-not-open-error-when-installing-phpmysql%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown