Ubuntu desktop 17.10 - a pain to install, help

  • Hi guys! I'm trying to install shinobi to compare it with zoneminder in usability, over a vm with ubuntu 17.10.
    I'm so rusty with linux and I'm hitting over problems during installation process (I started with a clean ubutnu).
    I started over the ninja way.
    All seems fine until npm start, that fail to run:

    [email protected]:~/Shinobi$ sudo npm start
    > [email protected] start /home/extreme/Shinobi
    > chmod +x INSTALL/start.sh && INSTALL/start.sh
    Shinobi Installer
    Select your OS
    If your OS is not on the list please refer to the docs.
    1. Ubuntu / Debian
    2. CentOS / RHEL / Fedora
    Shinobi - Do you want to Install Node.js?
    (y)es or (N)o
    : bad variable name4: read: nodejsinstall
    INSTALL/ubuntu.sh: 77: INSTALL/ubuntu.sh: Syntax error: "fi" unexpected (expecting "then")
    npm ERR! code ELIFECYCLE
    npm ERR! errno 2
    npm ERR! [email protected] start: `chmod +x INSTALL/start.sh && INSTALL/start.sh`
    npm ERR! Exit status 2
    npm ERR! 
    npm ERR! Failed at the [email protected] start script.
    npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
    npm ERR! A complete log of this run can be found in:
    npm ERR!     /home/extreme/.npm/_logs/2017-12-24T17_13_36_280Z-debug.log

    consequently I'm stuck.

    I previously installed shinobi following instructions at this url: https://www.reddit.com/r/ShinobiCCTV/comments/69tabf/install_that_worked_for_me_on_ubuntu_1604/
    I installed, configured, added an onvif camera; when I played with the installation of the motion plugin, something broken elsewhere and localhost:8080 started to reply with a "Cannot GET /" message (then I rebuilt my vm from the beginning)
    Installed again the same way, now the same "Cannot Get" message
    little bit frustrating 😛

  • I see that it asks if you want to install Node.js, and you said (N)o. Unless I'm missing something (and I'm new at this too), you need to install Node.js for Shinobi to work.

  • you are right, but I already installed it previously, so I said no 🙂
    anyway, yes or no made no difference, it fire the errors (like a syntax error in the script, but I checked and I'm unable to see any syntax error..).
    following the links, it install and works.. so I think something bad with latest releases, ubuntu 17.10 and/or something else.

  • I got the exact same error on 16.04 using the Ninja way. Seems like a simple syntax error in ubuntu.sh.

    The easier way using git clone almost works like a charm, only had some root permission issues.
    Chown and chmod fixed these issues.

    Is ubuntu.sh not identical in both installation methods?

  • for me is not a syntax error, I see nothing strange or worng. Maybe something else.

    As an additional issue the login page does not work anymore (form load, but login does not work, seems like it simply reload itself); the /super page let to login, but the next page have no contents. don't mind, the login issue was for a db password issue.. this is solved.

    what I need to know now is why the ninja way fail with ubuntu 17.10 and how to avoid this 🙂

  • On my system, the ubuntu.sh script had DOS-style newlines for some reason, thus thwarting its execution and leading to the syntax error. (Bash saw words like "then^M" when it expected "then".)

  • administrators

    Hi there. I just installed on Ubuntu 17.10 server and on Ubuntu 17.04 Desktop. If you are experiencing install issues instead of using sudo try becoming root first then running the installation. Doing this also means needing to start shinobi as root.

    For anyone who doesn't know how to become root on Ubuntu you can do sudo su.


Looks like your connection to Shinobi Forum was lost, please wait while we try to reconnect.