CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   [OpenFOAM.org] Issues installing openfoam 6 on Ubuntu 18.04 (https://www.cfd-online.com/Forums/openfoam-installation/209456-issues-installing-openfoam-6-ubuntu-18-04-a.html)

rnburne October 20, 2018 10:33

Issues installing openfoam 6 on Ubuntu 18.04
 
I'm upgrading to openfoam 6 on a newly installed Ubuntu 18.04.1
using the instructions at openfoam.org, which have worked well
in the past.

In response to the following commands.......


Code:

sudo sh -c "wget -O - http://dl.openfoam.org/gpg.key | apt-key add -"
sudo add-apt-repository http://dl.openfoam.org/ubuntu

I get..........

Code:

r@sys:~$ sudo apt-get update
Hit:1 http://us.archive.ubuntu.com/ubuntu bionic InRelease                   
Hit:2 http://archive.canonical.com/ubuntu bionic InRelease                   
Get:3 http://us.archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB] 
Get:5 http://security.ubuntu.com/ubuntu bionic-security InRelease [83.2 kB]   
Get:4 http://dl.openfoam.org/ubuntu bionic InRelease [6,337 B]               
Get:6 http://us.archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
Reading package lists... Done                                 
E: Release file for http://us.archive.ubuntu.com/ubuntu/...ates/InRelease is not valid yet (invalid for another 1h 50min 44s). Updates for this repository will not be applied.
E: Release file for http://dl.openfoam.org/ubuntu/dists/bionic/InRelease is not valid yet (invalid for another 2h 35min 9s). Updates for this repository will not be applied.
E: Release file for http://security.ubuntu.com/ubuntu/di...rity/InRelease is not valid yet (invalid for another 1h 50min 33s). Updates for this repository will not be applied.
E: Release file for http://us.archive.ubuntu.com/ubuntu/...orts/InRelease is not valid yet (invalid for another 1h 51min 9s). Updates for this repository will not be applied.

While not understanding the message, I went ahead and updated.......

Code:

r@sys:~$ sudo apt-get update
Hit:1 http://archive.canonical.com/ubuntu bionic InRelease
Hit:3 http://us.archive.ubuntu.com/ubuntu bionic InRelease                   
Get:2 http://security.ubuntu.com/ubuntu bionic-security InRelease [83.2 kB]   
Hit:8 http://us.archive.ubuntu.com/ubuntu xenial InRelease                   
Get:7 http://dl.openfoam.org/ubuntu bionic InRelease [6,337 B]               
Get:4 http://security.ubuntu.com/ubuntu xenial-security InRelease [107 kB]   
Get:5 http://us.archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB] 
Get:6 http://us.archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
Get:9 http://us.archive.ubuntu.com/ubuntu xenial-backports InRelease [107 kB]
Get:10 http://us.archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB]
Reading package lists... Done                               
E: Release file for http://security.ubuntu.com/ubuntu/di...rity/InRelease is not valid yet (invalid for another 1h 25min 1s). Updates for this repository will not be applied.
E: Release file for http://dl.openfoam.org/ubuntu/dists/bionic/InRelease is not valid yet (invalid for another 2h 9min 37s). Updates for this repository will not be applied.
E: Release file for http://security.ubuntu.com/ubuntu/di...rity/InRelease is not valid yet (invalid for another 1h 25min 39s). Updates for this repository will not be applied.
E: Release file for http://us.archive.ubuntu.com/ubuntu/...ates/InRelease is not valid yet (invalid for another 1h 25min 12s). Updates for this repository will not be applied.
E: Release file for http://us.archive.ubuntu.com/ubuntu/...orts/InRelease is not valid yet (invalid for another 1h 25min 38s). Updates for this repository will not be applied.
E: Release file for http://us.archive.ubuntu.com/ubuntu/...orts/InRelease is not valid yet (invalid for another 1h 27min 37s). Updates for this repository will not be applied.
E: Release file for http://us.archive.ubuntu.com/ubuntu/...ates/InRelease is not valid yet (invalid for another 1h 52min 46s). Updates for this repository will not be applied.

And tried the install command.........


Code:

r@sys:~$ sudo apt-get -y install openfoam6
Reading package lists... Done
Building dependency tree     
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 openfoam6 : Depends: libreadline-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Can anyone figure this out?


Ron

wyldckat October 20, 2018 15:12

Quick answer: I've Google'd for:
Code:

ubuntu "Release file for"  "is not valid yet"
and it seems that the problem is that your machine clock is ahead of time for a few hours, hence the message that the release file is not valid yet...

As far as I can figure out, this is a safety measure to avoid machines using a repository that is still syncing up with another server.

Allegedly:
  • Either you change how the clock is defined in your machine, namely by telling it to use NTP (the option is named something like "automatically defined with Internet clock") or run the following command:
    Code:

    sudo timedatectl set-ntp on
  • Or you change the current clock time manually, install OpenFOAM et al and the set the clock back to the desired time.

rnburne October 20, 2018 16:29

That was indeed the case........I had the correct
local time but the wrong time zone.
The installation is working properly, thank you
for the help Bruno.

Ron


All times are GMT -4. The time now is 22:57.