frewe
Hello everyone,
 
Not a pro at Ubuntu but not entirely new.
Correct me if this is wrong.
 
To install OpenPLC Editor, I downloaded the installer for Linux. After downloading the folder, I opened the terminal under the OpenPLC Editor folder, and then ran "sudo ./install.sh". Then I tried to restart the computer, and run OpenPLC Editor, but nothing happened.
 
Then, I tried to run sudo ./update.sh, it cloned a folder, and then downloaded some files. I then restarted the computer, and tried to run it again. That did not work.
 
I'd love some help on this as I'd like to explore the world of PLC programming.scScreenshot from 2023-11-28 21-42-26.png
 
Screenshot from 2023-11-28 21-42-50.png
 
Best regards, Fredrik (transitioning mechanical engineer 🙂)
Reply 0 0
thiagoralves
OpenPLC does not run on newer Linux distros due to python 2 support being dropped. Use Windows or macOS, or use an older Linux while the new OpenPLC version is not ready
Reply 1 0
frewe
Thank you Thiago, appreciate your response. May I ask which distro you recommend as of now? I can probably build a virtual machine or said image, in that case, and try again. 
Reply 0 0
thiagoralves
Ubuntu 18.04 or 20.04 works well
Reply 0 0
frewe
After a few tries I installed OpenPLC with VirtualBox and Ubuntu 20.0.4.6 64 bit and it seems to be working. Thanks! Looking forward to learning it. Appreciate your help Thiago.
Reply 0 0
frewe
However, upon opening and running Blink_LED example the program stated that Matiec installation is not found. The troubleshooting continues :-)
[203128%2F8470094%2Fmceclip0]
Reply 0 0
thiagoralves
How did you install it? Any install logs? It should compile and install matiec as part of the installation process.
Reply 0 0
frewe
I installed it using "sudo ./install.sh" from the OpenPLC Editor folder. Unzipped it and opened CMD in that folder. Ran the ./install.sh.
 
Installing OpenPLC EditorPlease be patient. This may take a couple minutes...[INSTALLING DEPENDENCIES]E: Unable to locate package libpng  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current                                 Dload  Upload   Total   Spent    Left  Speed100 1863k  100 1863k    0     0  3509k      0 --:--:-- --:--:-- --:--:-- 3509kDEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at  https://pip.pypa.io/en/latest/development/release-process/#python-2-support  pip 21.0 will remove support for this functionality.Collecting pip<21.0  Using cached pip-20.3.4-py2.py3-none-any.whl (1.5 MB)Installing collected packages: pip  Attempting uninstall: pip    Found existing installation: pip 20.3.4    Uninstalling pip-20.3.4:      Successfully uninstalled pip-20.3.4Successfully installed pip-20.3.4DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at  https://pip.pypa.io/en/latest/development/release-process/#python-2-support  pip 21.0 will remove support for this functionality.Requirement already satisfied: future in /usr/local/lib/python2.7/dist-packages (0.18.3)Requirement already satisfied: zeroconf==0.19.1 in /usr/local/lib/python2.7/dist-packages (0.19.1)Requirement already satisfied: numpy==1.16.5 in /usr/local/lib/python2.7/dist-packages (1.16.5)Requirement already satisfied: matplotlib==2.0.2 in /usr/local/lib/python2.7/dist-packages (2.0.2)Requirement already satisfied: lxml==4.6.2 in /usr/local/lib/python2.7/dist-packages (4.6.2)Requirement already satisfied: pyro in /usr/local/lib/python2.7/dist-packages (3.16)Requirement already satisfied: sslpsk in /usr/local/lib/python2.7/dist-packages (1.0.0)Requirement already satisfied: pyserial in /usr/local/lib/python2.7/dist-packages (3.5)Requirement already satisfied: jinja2 in /usr/local/lib/python2.7/dist-packages (2.11.3)Requirement already satisfied: netifaces!=0.10.5 in /usr/local/lib/python2.7/dist-packages (from zeroconf==0.19.1) (0.11.0)Requirement already satisfied: enum-compat in /usr/local/lib/python2.7/dist-packages (from zeroconf==0.19.1) (0.0.3)Requirement already satisfied: six in /usr/local/lib/python2.7/dist-packages (from zeroconf==0.19.1) (1.16.0)Requirement already satisfied: python-dateutil in /usr/local/lib/python2.7/dist-packages (from matplotlib==2.0.2) (2.8.2)Requirement already satisfied: pytz in /usr/local/lib/python2.7/dist-packages (from matplotlib==2.0.2) (2023.3.post1)Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=1.5.6 in /usr/local/lib/python2.7/dist-packages (from matplotlib==2.0.2) (2.4.7)Requirement already satisfied: functools32 in /usr/local/lib/python2.7/dist-packages (from matplotlib==2.0.2) (3.2.3.post2)Requirement already satisfied: cycler>=0.10 in /usr/local/lib/python2.7/dist-packages (from matplotlib==2.0.2) (0.10.0)Requirement already satisfied: subprocess32 in /usr/local/lib/python2.7/dist-packages (from matplotlib==2.0.2) (3.5.4)Requirement already satisfied: MarkupSafe>=0.23 in /usr/local/lib/python2.7/dist-packages (from jinja2) (1.1.1)Requirement already satisfied: enum34; python_version < "3.4" in /usr/local/lib/python2.7/dist-packages (from enum-compat->zeroconf==0.19.1) (1.1.10)[COMPILING MATIEC]checking for a BSD-compatible install... /usr/bin/install -cchecking whether build environment is sane... yes/home/openplc/Documents/OpenPLC Editor for Linux/OpenPLC_Editor/matiec/config/missing: Unknown `--is-lightweight' optionTry `/home/openplc/Documents/OpenPLC Editor for Linux/OpenPLC_Editor/matiec/config/missing --help' for more informationconfigure: WARNING: 'missing' script is too old or missingchecking for a thread-safe mkdir -p... /usr/bin/mkdir -pchecking for gawk... nochecking for mawk... mawkchecking whether make sets $(MAKE)... yeschecking whether make supports nested variables... yeschecking for bison... bison -ychecking whether make supports the include directive... yes (GNU style)checking for gcc... gccchecking whether the C compiler works... yeschecking for C compiler default output file name... a.outchecking for suffix of executables... checking whether we are cross compiling... nochecking for suffix of object files... ochecking whether we are using the GNU C compiler... yeschecking whether gcc accepts -g... yeschecking for gcc option to accept ISO C89... none neededchecking whether gcc understands -c and -o together... yeschecking dependency style of gcc... gcc3checking for flex... flexchecking lex output file root... lex.yychecking lex library... -lflchecking whether yytext is a pointer... yeschecking for g++... g++checking whether we are using the GNU C++ compiler... yeschecking whether g++ accepts -g... yeschecking dependency style of g++... gcc3checking whether ln -s works... yeschecking whether make sets $(MAKE)... (cached) yeschecking for ranlib... ranlibchecking for gawk... (cached) mawkchecking how to run the C preprocessor... gcc -Echecking for grep that handles long lines and -e... /usr/bin/grepchecking for egrep... /usr/bin/grep -Echecking for ANSI C header files... yeschecking for sys/types.h... yeschecking for sys/stat.h... yeschecking for stdlib.h... yeschecking for string.h... yeschecking for memory.h... yeschecking for strings.h... yeschecking for inttypes.h... yeschecking for stdint.h... yeschecking for unistd.h... yeschecking float.h usability... yeschecking float.h presence... yeschecking for float.h... yeschecking limits.h usability... yeschecking limits.h presence... yeschecking for limits.h... yeschecking for stdint.h... (cached) yeschecking for stdlib.h... (cached) yeschecking for string.h... (cached) yeschecking for strings.h... (cached) yeschecking sys/timeb.h usability... yeschecking sys/timeb.h presence... yeschecking for sys/timeb.h... yeschecking for unistd.h... (cached) yeschecking for stdbool.h that conforms to C99... yeschecking for _Bool... yeschecking for inline... inlinechecking for int16_t... yeschecking for int32_t... yeschecking for int64_t... yeschecking for int8_t... yeschecking for uint16_t... yeschecking for uint32_t... yeschecking for uint64_t... yeschecking for uint8_t... yeschecking for stdlib.h... (cached) yeschecking for GNU libc compatible malloc... yeschecking whether time.h and sys/time.h may both be included... yeschecking for sys/time.h... yeschecking for unistd.h... (cached) yeschecking for alarm... yeschecking for working mktime... yeschecking for stdlib.h... (cached) yeschecking for GNU libc compatible realloc... yeschecking for clock_gettime... yeschecking for memset... yeschecking for pow... nochecking for strcasecmp... yeschecking for strdup... yeschecking for strtoul... yeschecking for strtoull... yeschecking that generated files are newer than configure... doneconfigure: creating ./config.statusconfig.status: creating Makefileconfig.status: creating absyntax/Makefileconfig.status: creating absyntax_utils/Makefileconfig.status: creating stage1_2/Makefileconfig.status: creating stage3/Makefileconfig.status: creating stage4/Makefileconfig.status: creating stage4/generate_c/Makefileconfig.status: creating stage4/generate_json/Makefileconfig.status: creating stage4/generate_iec/Makefileconfig.status: creating config/config.hconfig.status: config/config.h is unchangedconfig.status: executing depfiles commandsMaking all in absyntaxMaking all in absyntax_utilsMaking all in stage1_2Making all in stage3Making all in stage4Making all in generate_cMaking all in generate_iecMaking all in generate_json[FINALIZING]./install.sh: line 91: cd: /root/.local/share/applications: No such file or directory
Reply 0 0
frewe
Excerpt from auth log during install
Nov 29 21:32:14 openplc-VirtualBox sudo:  openplc : TTY=pts/2 ; PWD=/home/openplc/Documents/OpenPLC Editor for Linux/OpenPLC_Editor ; USER=root ; COMMAND=./ install.sh Nov 29 21:32:14 openplc-VirtualBox sudo: pam_unix(sudo:session): session opened for user root by (uid=0)Nov 29 21:32:14 openplc-VirtualBox sudo:     root : TTY=pts/2 ; PWD=/home/openplc/Documents/OpenPLC Editor for Linux/OpenPLC_Editor ; USER=root ; COMMAND=/usr/bin/apt-get -y -qq updateNov 29 21:32:14 openplc-VirtualBox sudo: pam_unix(sudo:session): session opened for user root by (uid=0)Nov 29 21:32:21 openplc-VirtualBox sudo: pam_unix(sudo:session): session closed for user rootNov 29 21:32:21 openplc-VirtualBox sudo:     root : TTY=pts/2 ; PWD=/home/openplc/Documents/OpenPLC Editor for Linux/OpenPLC_Editor ; USER=root ; COMMAND=/usr/bin/apt-get -y -qq install curl build-essential pkg-config bison flex autoconf automake libtool make git libssl-devNov 29 21:32:21 openplc-VirtualBox sudo: pam_unix(sudo:session): session opened for user root by (uid=0)Nov 29 21:32:22 openplc-VirtualBox sudo: pam_unix(sudo:session): session closed for user rootNov 29 21:32:22 openplc-VirtualBox sudo:     root : TTY=pts/2 ; PWD=/home/openplc/Documents/OpenPLC Editor for Linux/OpenPLC_Editor ; USER=root ; COMMAND=/usr/bin/apt-get -y -qq install python2Nov 29 21:32:22 openplc-VirtualBox sudo: pam_unix(sudo:session): session opened for user root by (uid=0)Nov 29 21:32:23 openplc-VirtualBox sudo: pam_unix(sudo:session): session closed for user rootNov 29 21:32:23 openplc-VirtualBox sudo:     root : TTY=pts/2 ; PWD=/home/openplc/Documents/OpenPLC Editor for Linux/OpenPLC_Editor ; USER=root ; COMMAND=/usr/bin/apt-get -y -qq install python2.7Nov 29 21:32:23 openplc-VirtualBox sudo: pam_unix(sudo:session): session opened for user root by (uid=0)Nov 29 21:32:24 openplc-VirtualBox sudo: pam_unix(sudo:session): session closed for user rootNov 29 21:32:24 openplc-VirtualBox sudo:     root : TTY=pts/2 ; PWD=/home/openplc/Documents/OpenPLC Editor for Linux/OpenPLC_Editor ; USER=root ; COMMAND=/usr/bin/apt-get -y -qq install python-wxgtk3.0Nov 29 21:32:24 openplc-VirtualBox sudo: pam_unix(sudo:session): session opened for user root by (uid=0)Nov 29 21:32:25 openplc-VirtualBox sudo: pam_unix(sudo:session): session closed for user rootNov 29 21:32:25 openplc-VirtualBox sudo:     root : TTY=pts/2 ; PWD=/home/openplc/Documents/OpenPLC Editor for Linux/OpenPLC_Editor ; USER=root ; COMMAND=/usr/bin/apt-get -y -qq install libssl-devNov 29 21:32:25 openplc-VirtualBox sudo: pam_unix(sudo:session): session opened for user root by (uid=0)Nov 29 21:32:26 openplc-VirtualBox sudo: pam_unix(sudo:session): session closed for user rootNov 29 21:32:26 openplc-VirtualBox sudo:     root : TTY=pts/2 ; PWD=/home/openplc/Documents/OpenPLC Editor for Linux/OpenPLC_Editor ; USER=root ; COMMAND=/usr/bin/apt-get -y -qq install libxml2-dev libxslt1-devNov 29 21:32:26 openplc-VirtualBox sudo: pam_unix(sudo:session): session opened for user root by (uid=0)Nov 29 21:32:27 openplc-VirtualBox sudo: pam_unix(sudo:session): session closed for user rootNov 29 21:32:27 openplc-VirtualBox sudo:     root : TTY=pts/2 ; PWD=/home/openplc/Documents/OpenPLC Editor for Linux/OpenPLC_Editor ; USER=root ; COMMAND=/usr/bin/apt-get -y -qq install python2-devNov 29 21:32:27 openplc-VirtualBox sudo: pam_unix(sudo:session): session opened for user root by (uid=0)Nov 29 21:32:28 openplc-VirtualBox sudo: pam_unix(sudo:session): session closed for user rootNov 29 21:32:28 openplc-VirtualBox sudo:     root : TTY=pts/2 ; PWD=/home/openplc/Documents/OpenPLC Editor for Linux/OpenPLC_Editor ; USER=root ; COMMAND=/usr/bin/apt-get -y -qq install python2.7-devNov 29 21:32:28 openplc-VirtualBox sudo: pam_unix(sudo:session): session opened for user root by (uid=0)Nov 29 21:32:29 openplc-VirtualBox sudo: pam_unix(sudo:session): session closed for user rootNov 29 21:32:29 openplc-VirtualBox sudo:     root : TTY=pts/2 ; PWD=/home/openplc/Documents/OpenPLC Editor for Linux/OpenPLC_Editor ; USER=root ; COMMAND=/usr/bin/apt-get -y -qq install libpngNov 29 21:32:29 openplc-VirtualBox sudo: pam_unix(sudo:session): session opened for user root by (uid=0)Nov 29 21:32:30 openplc-VirtualBox sudo: pam_unix(sudo:session): session closed for user rootNov 29 21:32:30 openplc-VirtualBox sudo:     root : TTY=pts/2 ; PWD=/home/openplc/Documents/OpenPLC Editor for Linux/OpenPLC_Editor ; USER=root ; COMMAND=/usr/bin/apt-get -y -qq install libpng-dev libfreetype6-devNov 29 21:32:30 openplc-VirtualBox sudo: pam_unix(sudo:session): session opened for user root by (uid=0)Nov 29 21:32:31 openplc-VirtualBox sudo: pam_unix(sudo:session): session closed for user rootNov 29 21:32:32 openplc-VirtualBox sudo:     root : TTY=pts/2 ; PWD=/home/openplc/Documents/OpenPLC Editor for Linux/OpenPLC_Editor ; USER=root ; COMMAND=/usr/bin/python2.7  get-pip.py Nov 29 21:32:32 openplc-VirtualBox sudo: pam_unix(sudo:session): session opened for user root by (uid=0)Nov 29 21:32:36 openplc-VirtualBox sudo: pam_unix(sudo:session): session closed for user root
Reply 0 0
thiagoralves
Drop “sudo”. You shouldn’t use sudo to install this. Also, your logs are broken. I was expecting the terminal logs where the install script was executed, to make sure that MatIEC was compiled and installed correctly
Reply 0 0
frewe
Ok. I have a theory. I used "minimal installation" and not the one with extras upon installation of the machine.

I will reconfigure machine, and then do everything again, and send you the terminal logs.

Br Fredrik

EDIT: I reconfigured the machine, downloaded the OpenPLC Editor, unpacked it, opened CMD from that directory, ran ./ install.sh WITHOUT sudo and it seems to be working. Thank you so much for your help.
Screenshot from 2023-11-30 07-51-01.png
Console log:
"Start build in /home/fredrik/Documents/OpenPLC Editor for Linux/OpenPLC_Editor/editor/examples/Blink/build
Generating SoftPLC IEC-61131 ST/IL/SFC code...
Collecting data types
Collecting POUs
Generate POU Blink
Generate Config(s)
Compiling IEC Program into C code...
Extracting Located Variables...
C code generated successfully.
PLC :
[CC] plc_main.c -> plc_main.o
[CC] plc_debugger.c -> plc_debugger.o
py_ext :
[CC] py_ext.c -> py_ext.o
PLC :
[CC] Config0.c -> Config0.o
[CC] Res0.c -> Res0.o
Linking :
[CC] plc_main.o plc_debugger.o py_ext.o Config0.o Res0.o -> Blink.so
Successfully built.
Latest build matches with connected target."
Reply 0 0
Reply