meefik / linuxdeploy

Install and run GNU/Linux on Android
https://meefik.github.io/linuxdeploy
GNU General Public License v3.0
5.27k stars 680 forks source link

W: http: aptMethod::Configuration: could not load seccomp policy: Invalid argument #869

Open diakbar opened 7 years ago

diakbar commented 7 years ago

I got that error when trying apt-get install in KALI Linux deploy using Android Apps Linux Deploy. Is there something I missing from installation??

darkt1981 commented 6 years ago

to fix this try this, it worked for me seeing the above command is correct but github doesnt like the ">" icoon.

  1. goto console

  2. type : su root

  3. input your root password.

  4. sudo nano /etc/apt/apt.conf.d (this should open editor nano with the file or create it if its not there)

  5. in the editor type :

apt::sandbox::seccomp "false";

press CTRL + X , save the file.

darkt1981 commented 6 years ago
  1. now back in console type : sudo apt-update.

should work now, if not reboot and try step 6 again.

  1. if it keeps saying it cant find the repository, check to see if your sources.list has the latest one correctly set.
darkt1981 commented 6 years ago

sorry i made a typo at step 6:

its : sudo apt-get update

R3dB0b commented 6 years ago

Darkt1981 stuff will work

Also make sure the command is run as one line. It's not split in two. Let us know if it still doesn't work

KBClayton commented 6 years ago

darkt1981 worked for me with the one tweak that /etc/apt/apt.conf.d is a directory but just putting it in /etc/apt/apt.conf worked.

darkt1981 commented 6 years ago

i see make another error.

step 4. sudo nano /etc/apt/apt.conf.d/999seccomp (this should open editor nano with the file or create it if its not there)

darkt1981 commented 6 years ago

Cleaned up Fix:

somehow writing the fix told by the other gut didnt work for me so here the longer way to the same result.

to fix this try this, it worked for me seeing the above command is correct but github doesnt like the ">" icoon.

goto console

type : su root

input your root password.

sudo nano /etc/apt/apt.conf.d/999seccomp (this should open editor nano with the file or create it if its not there)

in the editor type :

apt::sandbox::seccomp "false";

press CTRL + X , save the file.

  1. now back in console type : sudo apt-get update. this should work now, if not reboot and try step 6 again.

if it keeps saying it cant find the repository, check to see if your sources.list has the latest one correctly set.

Ma5onic commented 6 years ago

Thanks @darkt1981! I would like to add that this also solves the same error that may appear when installing kali from the windows store.

The only difference is that you need to start at: sudo nano /etc/apt/apt.conf.d/999seccomp

image

Surrogard commented 6 years ago

People relax, it is a warning, you can safely ignore it. Apt-get and any other programs should still do their work just fine. @Windows10 users that just want to try Linux: don't prevent the warning by adding the seccomp file in apt.conf.d, the Windows Subsystem for Linux is in a state of flux and you might generate later problems by doing that.

iceman-twitch commented 6 years ago

i updated source.list added apt::sandbox::seccomp "false"; sudo nano /etc/apt/apt.conf.d/999seccomp really annoying now wat to do on linux subsystem version.

Err:1 http://http.kali.org/kali kali-rolling/main amd64 perl-modules-5.26 all 5.26.1-5
  Temporary failure resolving 'http.kali.org'

it is doing many attempts on different stuffs.

julian-klode commented 6 years ago

I disabled the seccomp sandbox in apt 1.6~rc1, so it's been "fixed" for a while now in bionic. It'll probably turn back on again next cycle, though, with some more tweaks.

R3dB0b commented 6 years ago

Cool thanks having seccomp on WSL working without having to disable it would be sweet. At least learning to troubleshoot the issue has helped me learn more about sandboxing in Linux. :)

R3dB0b commented 6 years ago

Kem008 check DNS resolution is working on the machine and that the repo source is still valid it may have changed or the source may have been temporarily down

jachin99 commented 6 years ago

@surrogard i disabled seccomp trying to update. Is seccomp only disabled for the duration of my session? If not is there a quick way to disable it? Is there a way to confirm updates or new packages have been applied by navigating the windows file system? Thanks

Surrogard commented 6 years ago

@jachin99 if you disabled it via the "/etc/apt/apt.conf.d/999seccomp" method then it is permanent as long as the "999seccomp" file exists in that directory. To your other question: the files from the linux instance lie somewhere on the computer (doesn't seem to be so easy to pinpoint), so you can most likely check if they were updated, but I would advise to do it in the linux shell. The easiest way should be to install something new and try running it afterwards. If it runs, it works ;) For example you could install the MidnightCommander "mc" if it is not yet installed: sudo apt-get install mc should do the trick and after that start mc. You'll know if the software starts or not... If you want to confirm what packages are installed in what version do a dpkg -l >before.txt before the upgrade and a dpkg -l > after.txt after it. Then you can use diff before.txt after.txt to see the differences

jachin99 commented 6 years ago

@Surrogard Thanks for help, and I'll investigate.

WSLUser commented 6 years ago

This occurs in WSL for Debian Buster (Unstable). Don't have a VM to verify if native Debian Buster does this as well. Far as I can tell though seccomp is a soft fail. Packages do install and can be run without issues. It would be nice to have it working though since this wasn't a thing in Debian stable, Ubuntu 16.04 LTS, etc.