- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Install omlib in Linux Ubuntu 20.04
Install omlib in Linux Ubuntu 20.04
Install omlib in Linux Ubuntu 20.04
Hi all,
I am trying to install OpenModelica in Linux Ubuntu 20.04 LTS (Focal Fossa). When installing the omlibrary using
$ for PKG in `apt-cache search "omlib-.*" | cut -d" " -f1`; do sudo apt-get install -y "$PKG"; done # Installs optional Modelica libraries (most have not been tested with OpenModelica)
I get the error:
E: Unable to locate package omlib-.*
How should I install it?
Thank you
Re: Install omlib in Linux Ubuntu 20.04
Do you have the apt repository and did you call "apt update" ? I'm on focal and this is my output:
Code:
[martin@mega ~]$ apt-cache search "omlib-.*"
omlib-advancednoise-1.0.1 - AdvancedNoise 1.0.1 is a Modelica library
omlib-aixlib-0.4.0 - AixLib 0.4.0 is a Modelica library
omlib-aixlib-0.9.1 - AixLib 0.9.1 is a Modelica library
...
- sjoelund.se
- 1700 Posts
Re: Install omlib in Linux Ubuntu 20.04
Yes I have called "apt update" and I have the repo.
I am also on focal and this is my output:
lub@lub-VirtualBox:~$ apt-cache search "omlib-.*"
omlib-adgenkinetics - ADGenKinetics is a Modelica library
omlib-admsl -ADMSL is a Modelica library
...
Should I write exactly this command : $ for PKG in `apt-cache search "omlib-.*" | cut -d" " -f1`; do sudo apt-get install -y "$PKG"; done ?
I get:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package apt-cache search "omlib-.*" | cut -d" " -f1
E: Couldn't find any package by glob 'apt-cache search "omlib-.*" | cut -d" " -f1'
E: Couldn't find any package by regex 'apt-cache search "omlib-.*" | cut -d" " -f1'
Thank you
Re: Install omlib in Linux Ubuntu 20.04
Yes, if I copy-paste what you put in the forums or on the download page, it starts installing. It seems you didn't put a pipe, but rather quoted something causing you to search for some string that contains | cut -d" " -f1 instead of piping the output of apt-cache search into the cut command...
- sjoelund.se
- 1700 Posts
- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Install omlib in Linux Ubuntu 20.04