Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

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
...

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...

Re: Install omlib in Linux Ubuntu 20.04

If I can't solve this issue, is there another way to install de om library?

Thank you

Re: Install omlib in Linux Ubuntu 20.04

Problem solved.

Thank you again

There are 0 guests and 0 other users also viewing this topic
You are here: