1

I am trying to install snapd on gentoo and get the following error:

$ sudo emerge snapd
Password: 

 * IMPORTANT: 10 news items need reading for repository 'gentoo'.
 * Use eselect news read to view new items.


 * IMPORTANT: 3 config files in '/etc/portage' need updating.
 * See the CONFIGURATION FILES and CONFIGURATION FILES UPDATE TOOLS
 * sections of the emerge man page to learn how to update config files.
Calculating dependencies... done!

>>> Verifying ebuild manifests

>>> Emerging (1 of 1) app-emulation/snapd-2.44.5::snapd
 * snapd-2.44.5.tar.xz BLAKE2B SHA512 size ;-) ...                                                                                            [ ok ]
 * Determining the location of the kernel source code
 * Found kernel source directory:
 *     /usr/src/linux
 * Found sources for kernel version:
 *     5.4.48-gentoo-x86_64
 * Checking for suitable kernel configuration options...
 *   CONFIG_SECURITY_APPARMOR:   is not set when it should be.
 * Please check to make sure these options are set correctly.
 * Failure to do so may cause unexpected problems.
 * Once you have satisfied these options, please try merging
 * this package again.
 * ERROR: app-emulation/snapd-2.44.5::snapd failed (setup phase):
 *   Incorrect kernel configuration options
 * 
 * Call stack:
 *           ebuild.sh, line 125:  Called pkg_setup
 *           ebuild.sh, line 355:  Called linux-info_pkg_setup
 *   linux-info.eclass, line 962:  Called check_extra_config
 *   linux-info.eclass, line 854:  Called die
 * The specific snippet of code:
 *          die "Incorrect kernel configuration options"
 * 
 * If you need support, post the output of `emerge --info '=app-emulation/snapd-2.44.5::snapd'`,
 * the complete build log and the output of `emerge -pqv '=app-emulation/snapd-2.44.5::snapd'`.
 * The complete build log is located at '/var/tmp/portage/app-emulation/snapd-2.44.5/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/app-emulation/snapd-2.44.5/temp/die.env'.
 * Working directory: '/var/tmp/portage/app-emulation/snapd-2.44.5/homedir'
 * S: '/var/tmp/portage/app-emulation/snapd-2.44.5/work/snapd-2.44.5'

>>> Failed to emerge app-emulation/snapd-2.44.5, Log file:

>>>  '/var/tmp/portage/app-emulation/snapd-2.44.5/temp/build.log'

 * Messages for package app-emulation/snapd-2.44.5:

 *   CONFIG_SECURITY_APPARMOR:   is not set when it should be.
 * Please check to make sure these options are set correctly.
 * Failure to do so may cause unexpected problems.
 * Once you have satisfied these options, please try merging
 * this package again.
 * ERROR: app-emulation/snapd-2.44.5::snapd failed (setup phase):
 *   Incorrect kernel configuration options
 * 
 * Call stack:
 *           ebuild.sh, line 125:  Called pkg_setup
 *           ebuild.sh, line 355:  Called linux-info_pkg_setup
 *   linux-info.eclass, line 962:  Called check_extra_config
 *   linux-info.eclass, line 854:  Called die
 * The specific snippet of code:
 *          die "Incorrect kernel configuration options"
 * 
 * If you need support, post the output of `emerge --info '=app-emulation/snapd-2.44.5::snapd'`,
 * the complete build log and the output of `emerge -pqv '=app-emulation/snapd-2.44.5::snapd'`.
 * The complete build log is located at '/var/tmp/portage/app-emulation/snapd-2.44.5/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/app-emulation/snapd-2.44.5/temp/die.env'.
 * Working directory: '/var/tmp/portage/app-emulation/snapd-2.44.5/homedir'
 * S: '/var/tmp/portage/app-emulation/snapd-2.44.5/work/snapd-2.44.5'

Can anyone help me how to configure linux kernel for snapd!

1

The error message says:

* Checking for suitable kernel configuration options...
*   CONFIG_SECURITY_APPARMOR:   is not set when it should be.
* Please check to make sure these options are set correctly.
* Failure to do so may cause unexpected problems.
* Once you have satisfied these options, please try merging
* this package again.

That indicates that the package depends on the kernel configuration option CONFIG_SECURITY_APPARMOR, and that it's not set. You need to reconfigure the kernel to enable that option, rebuild the kernel, reboot (or load the relevant module), then try to install the package again.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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