StamusNetworks / scirius

Scirius is a web application for Suricata ruleset management and threat hunting.
GNU General Public License v3.0
614 stars 150 forks source link

Python 2.7???? #242

Closed ghost closed 2 years ago

ghost commented 2 years ago

cd hund npm install --legacy-peer-deps

pm install --legacy-peer-deps
npm ERR! code 1
npm ERR! path /scirius/hunt/node_modules/node-sass-chokidar/node_modules/node-sass
npm ERR! command failed
npm ERR! command sh -c node scripts/build.js
npm ERR! Building: /usr/bin/node /scirius/hunt/node_modules/node-sass-chokidar/node_modules/node-sass/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp verb cli [
npm ERR! gyp verb cli   '/usr/bin/node',
npm ERR! gyp verb cli   '/scirius/hunt/node_modules/node-sass-chokidar/node_modules/node-sass/node_modules/node-gyp/bin/node-gyp.js',
npm ERR! gyp verb cli   'rebuild',
npm ERR! gyp verb cli   '--verbose',
npm ERR! gyp verb cli   '--libsass_ext=',
npm ERR! gyp verb cli   '--libsass_cflags=',
npm ERR! gyp verb cli   '--libsass_ldflags=',
npm ERR! gyp verb cli   '--libsass_library='
npm ERR! gyp verb cli ]
npm ERR! gyp info using node-gyp@3.8.0
npm ERR! gyp info using node@14.17.6 | linux | x64
npm ERR! gyp verb command rebuild []
npm ERR! gyp verb command clean []
npm ERR! gyp verb clean removing "build" directory
npm ERR! gyp verb command configure []
npm ERR! gyp verb check python checking for Python executable "python2" in the PATH
npm ERR! gyp verb `which` failed Error: not found: python2
npm ERR! gyp verb `which` failed     at getNotFoundError (/scirius/hunt/node_modules/which/which.js:13:12)
npm ERR! gyp verb `which` failed     at F (/scirius/hunt/node_modules/which/which.js:68:19)
npm ERR! gyp verb `which` failed     at E (/scirius/hunt/node_modules/which/which.js:80:29)
npm ERR! gyp verb `which` failed     at /scirius/hunt/node_modules/which/which.js:89:16
npm ERR! gyp verb `which` failed     at /scirius/hunt/node_modules/isexe/index.js:42:5
npm ERR! gyp verb `which` failed     at /scirius/hunt/node_modules/isexe/mode.js:8:5
npm ERR! gyp verb `which` failed     at FSReqCallback.oncomplete (fs.js:192:21)
npm ERR! gyp verb `which` failed  python2 Error: not found: python2
npm ERR! gyp verb `which` failed     at getNotFoundError (/scirius/hunt/node_modules/which/which.js:13:12)
npm ERR! gyp verb `which` failed     at F (/scirius/hunt/node_modules/which/which.js:68:19)
npm ERR! gyp verb `which` failed     at E (/scirius/hunt/node_modules/which/which.js:80:29)
npm ERR! gyp verb `which` failed     at /scirius/hunt/node_modules/which/which.js:89:16
npm ERR! gyp verb `which` failed     at /scirius/hunt/node_modules/isexe/index.js:42:5
npm ERR! gyp verb `which` failed     at /scirius/hunt/node_modules/isexe/mode.js:8:5
npm ERR! gyp verb `which` failed     at FSReqCallback.oncomplete (fs.js:192:21) {
npm ERR! gyp verb `which` failed   code: 'ENOENT'
npm ERR! gyp verb `which` failed }
npm ERR! gyp verb check python checking for Python executable "python" in the PATH
npm ERR! gyp verb `which` succeeded python /usr/bin/python
npm ERR! gyp ERR! configure error 
npm ERR! gyp ERR! stack Error: Command failed: /usr/bin/python -c import sys; print "%s.%s.%s" % sys.version_info[:3];
npm ERR! gyp ERR! stack   File "<string>", line 1
npm ERR! gyp ERR! stack     import sys; print "%s.%s.%s" % sys.version_info[:3];
npm ERR! gyp ERR! stack                       ^
npm ERR! gyp ERR! stack SyntaxError: invalid syntax
npm ERR! gyp ERR! stack 
npm ERR! gyp ERR! stack     at ChildProcess.exithandler (child_process.js:390:12)
npm ERR! gyp ERR! stack     at ChildProcess.emit (events.js:400:28)
npm ERR! gyp ERR! stack     at maybeClose (internal/child_process.js:1055:16)
npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
npm ERR! gyp ERR! System Linux 5.11.0-27-generic
npm ERR! gyp ERR! command "/usr/bin/node" "/scirius/hunt/node_modules/node-sass-chokidar/node_modules/node-sass/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
npm ERR! gyp ERR! cwd /scirius/hunt/node_modules/node-sass-chokidar/node_modules/node-sass
npm ERR! gyp ERR! node -v v14.17.6
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok 
npm ERR! Build failed with error code: 1

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2021-09-16T11_52_35_420Z-debug.log
ghost commented 2 years ago

Official documentation is out of date

pevma commented 2 years ago

@Bittyby - what was missing / wrong on the doc side?

ghost commented 2 years ago

@Bittyby - what was missing / wrong on the doc side?

scirius
nano /etc/portage/package.use
net-libs/nodejs -lto

emerge --ask net-libs/nodejs

su user

cd /home/user && git clone https://github.com/StamusNetworks/scirius && cd scirius
emerge --ask dev-python/pip dev-python/python-ldap

pip install -r requirements.txt --user

exit && cd scirius
npm install
mkdir /var/log/scirius/ && touch /var/log/scirius/elasticsearch.log
chown -R user:user /var/log/scirius

npm install async --legacy-peer-deps
npm install ajv --legacy-peer-deps
npm isntall babel-runtime
npm install caniuse-lite
npm install -g npm webpack
npm install --save-dev webpack-cli
webpack

su user
python manage.py migrate
python manage.py createsuperuser
python manage.py createcachetable

nano scirius/settings.py
DEBUG = True 

ALLOWED_HOSTS = ['YOURIP] 

python manage.py runserver YOURIP:8000

This is a complete installation instruction for Gentoo from 0, BUT, yours is no longer relevant for Ubuntu either

ghost commented 2 years ago

python --version Python 3.9.6

pevma commented 2 years ago

Thank you for the feedback!