StamusNetworks/scirius

Unbale to run manage.py script

ngms17 opened this issue · 15 comments

Hello,

Getting this error while running the script.

image

Dont know how to fix this. I need some help

pevma commented

Which Scirius version do you use and what is the command you are trying to execute?

Now i am trying to execute "python3 manage.py migrate"

Its giving me this error.
root@suricata:~/scirius# python3 manage.py migrate
Traceback (most recent call last):
File "manage.py", line 10, in
execute_from_command_line(sys.argv)
File "/usr/local/lib/python3.6/dist-packages/django/core/management/init.py", line 419, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python3.6/dist-packages/django/core/management/init.py", line 395, in execute
django.setup()
File "/usr/local/lib/python3.6/dist-packages/django/init.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "/usr/local/lib/python3.6/dist-packages/django/apps/registry.py", line 91, in populate
app_config = AppConfig.create(entry)
File "/usr/local/lib/python3.6/dist-packages/django/apps/config.py", line 224, in create
import_module(entry)
File "/usr/lib/python3.6/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 994, in _gcd_import
File "", line 971, in _find_and_load
File "", line 953, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'bootstrap3'

Following all the commands from the documentation gives me the first error that i have shown

pevma commented

It seems some dependencies are missing.
@yodapotatofly can you lend a hand ?

The missing dependencies usually occurs because scirius is using a python virtual environment. Therefore, python packages (dependencies) are only available from inside the virtual env.
The virtual env needs to be activated before running those commands.

I will be able to complete this answer with exact commands tomorrow

Usually, the path to scirius installation is /usr/share/python/scirius

Following commands should resolve your issue :

cd /usr/share/python/scirius/
. bin/activate
python3 bin/manage.py migrate
deactivate
cd ~

Usually, the path to scirius installation is /usr/share/python/scirius

Following commands should resolve your issue :

cd /usr/share/python/scirius/
. bin/activate
python3 bin/manage.py migrate
deactivate
cd ~

But i dont have the following path "cd /usr/share/python/scirius".

Scirius folder is not there

Is there any way to remove scirius and remove and the dependencies attached to it?

In order to follow all the commands all over again?

Is there any way to remove scirius and remove and the dependencies attached to it?

apt purge scirius
apt autoremove

Getting this error when executing "npm install -g npm@latest webpack@3.11"

Screenshot 2021-05-12 at 22 45 19

You could just use the apt package instead of building everything by hand:
sudo apt install scirius

However, if you want to build it yourself, please follow those commands for the nodejs part

sudo apt-get install npm
npm install
npm install -g webpack@3.11
webpack
cd hunt
npm install
npm run build
cd ..

Using the apt package gives the error "unable to locate the package".

What is the repository?

What OS are you running ?

Ubuntu 18.04

OK so indeed the debian package would not be the way to go.

First make sure you have the python dependencies :

python -m pip install --upgrade pip wheel setuptools
python -m pip install --upgrade six python-daemon suricatactl
python -m pip install django-bootstrap3==11.1.0 elasticsearch-curator==5.6 django-webpack-loader==0.7 pyinotify
python -m pip install -r requirements.txt  

then execute the commands for the nodejs part :

sudo apt-get install npm

npm install
npm install -g webpack@3.11
webpack
cd hunt
npm install
npm run build
cd ..

You should then be able to go on from there https://scirius.readthedocs.io/en/latest/installation-ce.html#running-scirius-ce