evilsocket / opensnitch

OpenSnitch is a GNU/Linux interactive application firewall inspired by Little Snitch.
GNU General Public License v3.0
9.86k stars 488 forks source link

ModuleNotFoundError: No module named 'google' #930

Closed ushby closed 1 year ago

ushby commented 1 year ago

Describe the bug I am trying to install the deb on ubuntu 22.04, dpkg install asked for dependencies which I couldn't fix with apt install -f, python is installed but shows errors as seen in the screenshot, and I also tried the proposed solution which suggests python3.10 -m pip install --ignore-installed grpcio. I don't know what to do ..

The information is as follows :

The daemon starts fine and systemd shows active and running (Green)

The deb packages fail to install:

sudo dpkg -i opensnitch*
(Reading database ... 331022 files and directories currently installed.)
Preparing to unpack opensnitch_1.6.0-rc.5-1_amd64.deb ...
Unpacking opensnitch (1.6.0-rc.5-1) over (1.6.0-rc.5-1) ...
dpkg: dependency problems prevent configuration of opensnitch:
 opensnitch depends on libnetfilter-queue1; however:
  Package libnetfilter-queue1:amd64 is not configured yet.

dpkg: error processing package opensnitch (--install):
 dependency problems - leaving unconfigured
Errors were encountered while p ..

Screenshots ddd1e46381b

gustavo-iniguez-goya commented 1 year ago

hi @jindiggs ,

dpkg install asked for dependencies which I couldn't fix

could you post the installation log of python3-opensnitch-ui? All the required dependencies are available on ubuntu 22.04, so it should install just fine.

Try installing the packages with: $ sudo apt opensnitch* python3-opensnitch* it'll resolve the dependencies.

On the other hand, don't run the GUI as root. Probably you ran the pip3 command as your regular user, but running the GUI as root takes the libs from others paths.

ushby commented 1 year ago

hi @jindiggs ,

dpkg install asked for dependencies which I couldn't fix

could you post the installation log of python3-opensnitch-ui? All the required dependencies are available on ubuntu 22.04, so it should install just fine.

screenshot-sssssc116e6de

Try installing the packages with: $ sudo apt opensnitch* python3-opensnitch* it'll resolve the dependencies.

I get this : Reading package lists... Done Building dependency tree... Done Reading state information... Done E: Unable to locate package opensnitch_1.6.0-rc.5-1_amd64.deb E: Unable to locate package python3-opensnitch-ui_1.6.0-rc.5-1_all.deb E: Unable to locate package python3-opensnitch-ui_1.6.0-rc.5-1_all.PIP.deb

On the other hand, don't run the GUI as root. Probably you ran the pip3 command as your regular user, but running the GUI as root takes the libs from others paths.

Traceback (most recent call last):
File "/usr/bin/opensnitch-ui", line 40, in <module>
from opensnitch.service import UIService
File "/usr/lib/python3/dist-packages/opensnitch/service.py", line 13, in <module>
from opensnitch import ui_pb2
File "/usr/lib/python3/dist-packages/opensnitch/ui_pb2.py", line 6, in <module>
from google.protobuf.internal import enum_type_wrapper
ModuleNotFoundError: No module named 'google'

On my colleague's machine, which is Debian 11 OS, it installed with some error, but after repetition things started to work, although Ubuntu 22.04 is a little hard here.

gustavo-iniguez-goya commented 1 year ago

sorry, I meant: $ sudo apt ./opensnitch* ./python3-opensnitch*

Bear in mind that in this case, the .deb packages must be on the same directory where you execute the apt command. Otherwise change ./ by the path to the deb packages.

anyway, a sudo apt -f install should resolve the dependencies.