Trying to install EmonCMS on Ubuntu 20.04LTS. The install script fails with this error:
PHP Warning: chdir(): No such file or directory (errno 2) in /opt/openenergymonitor/EmonScripts/common/emoncmsdbupdate.php on line 8
PHP Warning: require(process_settings.php): failed to open stream: No such file or directory in /opt/openenergymonitor/EmonScripts/common/emoncmsdbupdate.php on line 9
PHP Fatal error: require(): Failed opening required 'process_settings.php' (include_path='.:/usr/share/php') in /opt/openenergymonitor/EmonScripts/common/emoncmsdbupdate.php on line 9
When I checked /var/www there was no emoncms folder.
Any idea what’s wrong?
@ishtangli, I shared my Ubuntu install notes in this topic. Hopefully my notes are of some use…
How long ago was this install?
I was able to successfully install it using the script last year. Must have been some significant change since then.
I’ve gotten the system to partially run by manually doing a git clone of emoncms to /var/www and changing the default passwords in settings.ini to match the ones in config.ini.
I still have 2 red lights under System Info: feedwriter and demandshaper.
I was able to setup a fresh install with 0 hassle (2021 edition). Here are the steps:
- Install Ubuntu 20.04LTS. When asked to create a user, use “pi”
- sudo echo $USER’ ALL=(ALL) NOPASSWD: ALL’ | sudo tee /etc/sudoers.d/$USER && sudo chmod 0440 /etc/sudoers.d/$USER
- wget https://raw.githubusercontent.com/openenergymonitor/EmonScripts/master/install/init.sh
chmod +x init.sh && ./init.sh
- say Y when asked to review the config
- cd /opt/openenergymonitor/EmonScripts/install/
- Set emonSD_pi_env=0
- replace all “stable” with “master”
- Save and quit
You can now access the server through the IP address. Everything works out of the box except for update which gives the “invalid serial port” error.
update App throws a “connection error”
Thanks @ishtangli that should now be fixed! Though you may have to manually run the following commands to get past the issue:
Worked perfectly. Thanks.
Now my only problem is in the app
Get a connection error after 10 seconds which wasnt an issue on my 2019 installation (ubuntu 18).
I get the following error when executing the first instruction:
-bash: syntax error near unexpected token `(’
When I run the commands using ‘sudo’ (since I get an error on the first instruction), I receive the following error on the last step:
./main.sh: 90: /EmonScripts/install/non_emonsd.sh: not found
I was able to get a clean install using these steps on July 27th.
Which instruction from where?
Here? EmonScripts/readme.md at master · openenergymonitor/EmonScripts · GitHub
Thanks for the link. That works properly. I was using the text from the Jul 19 post.