oblique / create_ap

[NOT MAINTAINED] This script creates a NATed or Bridged WiFi Access Point.
BSD 2-Clause "Simplified" License
4.45k stars 1k forks source link

Error running on OpenSUSE Tumbleweed #178

Closed brunomiguel closed 8 years ago

brunomiguel commented 8 years ago

I've installed create_ap on OpenSUSE Tumbleweed and, everytime I try to run it, I get this error:

Config dir: /tmp/create_ap.wlp2s0.conf.c5yxh7Jm
PID: 9377
Network Manager found, set ap0 as unmanaged device... DONE
wlp2s0 is already associated with channel 6 (2437 MHz), fallback to channel 6
Creating a virtual WiFi interface... ap0 created.
Sharing Internet using method: nat
Traceback (most recent call last):
  File "/usr/sbin/complain", line 17, in <module>
    import apparmor.tools
  File "/usr/lib/python3.5/site-packages/apparmor/tools.py", line 17, in <module>
    import apparmor.aa as apparmor
  File "/usr/lib/python3.5/site-packages/apparmor/aa.py", line 29, in <module>
    import apparmor.logparser
  File "/usr/lib/python3.5/site-packages/apparmor/logparser.py", line 19, in <module>
    import LibAppArmor
  File "/usr/lib64/python3.5/site-packages/LibAppArmor/__init__.py", line 18, in <module>
    _LibAppArmor = swig_import_helper()
  File "/usr/lib64/python3.5/site-packages/LibAppArmor/__init__.py", line 17, in swig_import_helper
    return importlib.import_module(mname)
  File "/usr/lib64/python3.5/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
ImportError: No module named '_LibAppArmor'

dnsmasq: cannot read /tmp/create_ap.wlp2s0.conf.c5yxh7Jm/dnsmasq.conf: Permission denied

Doing cleanup.. done

For what I can see, there is some module named LibAppArmor missing. I've installed the apparmor stuff (python and not) available in the repos, but I still can't run it. Any hints?

brunomiguel commented 8 years ago

Update: if I set the dnsmasq apparmor profile to complain, using Yast, it works (although giving the same error, only not killing the app), but this is a temporary fix

brunomiguel commented 8 years ago

It appears the bug is OpenSUSE/Python related. A simple 'cp /usr/lib64/python3.5/site-packages/LibAppArmor/_LibAppArmor.cpython-35m-x86_64-linux-gnu.so /usr/lib64/python3.5/site-packages/' solved the issue.