View Issue Details

IDProjectCategoryView StatusLast Update
0002968OpenFOAMBugpublic2018-06-03 20:06
Reporterameyv05 Assigned Towyldckat  
PrioritynormalSeveritytextReproducibilityalways
Status closedResolutionno change required 
PlatformUbuntu OSUbuntu 16.04 
Summary0002968: apt-get update error: What to do when the wrong URL is used?
DescriptionHi

While installing openFOAM on ubuntu I get the following errors:

W: The repository 'http://dl.openfoam.org/ubuntu~ xenial Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: The repository 'http://dl.openfoam.org/download/ubuntu xenial Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: The repository 'http://www.openfoam.org/download/ubuntu xenial Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Failed to fetch http://dl.openfoam.org/ubuntu~/dists/xenial/main/binary-amd64/Packages 404 Not Found
E: Failed to fetch http://dl.openfoam.org/download/ubuntu/dists/xenial/main/binary-amd64/Packages 404 Not Found
E: Failed to fetch https://www.openfoam.org/download/ubuntu/dists/xenial/main/binary-amd64/Packages Protocol "http" not supported or disabled in libcurl
E: Some index files failed to download. They have been ignored, or old ones used instead.

I guess the director has "ubuntu~" and not "ubuntu".

Please help me.
TagsNo tags attached.

Activities

wyldckat

2018-06-01 21:58

updater   ~0009684

Run the following command for removing the broken link:

   sudo add-apt-repository -r http://dl.openfoam.org/ubuntu~


Then add the correct one and try updating once again, by running the following commands:

   sudo add-apt-repository http://dl.openfoam.org/ubuntu
   sudo apt-get update

ameyv05

2018-06-01 22:04

reporter   ~0009685

Hi,

Thank you! I did, but it still has other errors-

W: The repository 'http://dl.openfoam.org/download/ubuntu xenial Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: The repository 'http://www.openfoam.org/download/ubuntu xenial Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Failed to fetch http://dl.openfoam.org/download/ubuntu/dists/xenial/main/binary-amd64/Packages 404 Not Found
E: Failed to fetch https://www.openfoam.org/download/ubuntu/dists/xenial/main/binary-amd64/Packages Protocol "http" not supported or disabled in libcurl
E: Some index files failed to download. They have been ignored, or old ones used instead.

wyldckat

2018-06-01 22:24

updater   ~0009687

OK, then it seems like you have one or two old apt-repository definitions somewhere in your Ubuntu installation.

I had something similar and there are two possible solutions:

  1. You can try using a similar command for removing the two outdated repository links:

    sudo add-apt-repository -r http://dl.openfoam.org/download/ubuntu
    sudo add-apt-repository -r http://www.openfoam.org/download/ubuntu


  2. Or you will have to remove the lines mentioning "openfoam" from the file "/etc/apt/sources.list". You can do this by running the following commands and be very careful when writing them (or copy-pasting them):

    sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup
    sudo grep -v -e "openfoam" /etc/apt/sources.list.backup > /etc/apt/sources.list


If the first solution doesn't work, try the second one. But after the 2 commands of each solution, don't forget to do the 'apt update' again:

    sudo apt-get update

ameyv05

2018-06-01 23:46

reporter   ~0009689

Hi,

The first solution worked. I could install. But, now I have another issue.
During the user configuration- after editing bashrc where I run through the source ~/.bashrc I get the following error
/home/yashasvi/.bashrc:16: command not found: shopt
/home/yashasvi/.bashrc:24: command not found: shopt
/home/yashasvi/.bashrc:111: command not found: shopt
/usr/share/bash-completion/bash_completion:51: command not found: shopt
/usr/share/bash-completion/bash_completion:57: command not found: complete
/usr/share/bash-completion/bash_completion:62: command not found: complete
/usr/share/bash-completion/bash_completion:65: command not found: complete
/usr/share/bash-completion/bash_completion:68: command not found: complete
/usr/share/bash-completion/bash_completion:71: command not found: complete
/usr/share/bash-completion/bash_completion:74: command not found: complete
/usr/share/bash-completion/bash_completion:77: command not found: complete
/usr/share/bash-completion/bash_completion:80: command not found: complete
/usr/share/bash-completion/bash_completion:83: command not found: complete
/usr/share/bash-completion/bash_completion:86: command not found: complete
/usr/share/bash-completion/bash_completion:89: command not found: complete
/usr/share/bash-completion/bash_completion:92: command not found: complete
/usr/share/bash-completion/bash_completion:314: parse error near `\n'
\[\e]0;\u@\h: \w\a\]\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]$

I feel the installation wasn't correct. Please check the attached image of the installation folder.

wyldckat

2018-06-02 00:19

updater   ~0009690

A quick Googling for "command not found: shopt" and it seems like you are in fact using 'zsh' as the default shell, not 'bash'. Which means that you should edit the file "~/.zshrc" and add the line:

   source /opt/openfoam5/etc/bashrc

in that file; save and close. Then 'source' the file "~/.zshrc", namely by running:

   source ~/.zshrc

This should solve one problem...


As for the missing files in your installation, that is really strange. Please try running the following command:

   ls -la /opt/openfoam5

to try and see the complete list of files and folders, just in case some of them were hidden.
If they are really not there, namely the file and folder list is not similar to the one shown here: https://github.com/OpenFOAM/OpenFOAM-5.x/
... then I would suggest to try and reinstall it again, by running:

   sudo apt-get -y install --reinstall openfoam5

ameyv05

2018-06-02 08:56

reporter   ~0009691

Hi,

Thanks for everything. It works perfectly now.

I guess, the files were indeed hidden.

and the zshrc solves the problem.

Best,
Amey

wyldckat

2018-06-03 20:06

updater   ~0009698

@Chris: I'm closing this as "no change required", given that this is somewhat of a group of corner cases that is rare to occur, but at least it can be a future reference in case it happens again:

 1- When outdated repositories are in the aptitude repository lists, it's necessary to remove them, or at least so that they don't confuse the user trying to install OpenFOAM. Ways to remove them are in comment ~0009687.

 2- When 'zsh' is being used as the default shell, the user should place the source line inside the respective rc-file, namely "~/.zshrc", given that OpenFOAM's 'etc/bashrc' file is compatible which 'zsh', but the usual system's '~/.bashrc' set-up is not friendly towards 'zsh'.

 3- As for the files being hidden in ameyv05's file browser, I am no aware as to why that would happen, unless it is a security feature for the software being used in that case. The desktop snapshot that was provided does not look like anything I've seen so far.

Issue History

Date Modified Username Field Change
2018-06-01 20:54 ameyv05 New Issue
2018-06-01 21:58 wyldckat Note Added: 0009684
2018-06-01 22:01 wyldckat Priority immediate => normal
2018-06-01 22:01 wyldckat Severity major => text
2018-06-01 22:01 wyldckat Summary apt-get update error => apt-get update error: What to do when the wrong URL is used?
2018-06-01 22:04 ameyv05 Note Added: 0009685
2018-06-01 22:24 wyldckat Note Added: 0009687
2018-06-01 23:46 ameyv05 File Added: Screenshot from 2018-06-02 00-42-38.png
2018-06-01 23:46 ameyv05 Note Added: 0009689
2018-06-02 00:19 wyldckat Note Added: 0009690
2018-06-02 08:56 ameyv05 Note Added: 0009691
2018-06-03 20:06 wyldckat Assigned To => wyldckat
2018-06-03 20:06 wyldckat Status new => closed
2018-06-03 20:06 wyldckat Resolution open => no change required
2018-06-03 20:06 wyldckat Note Added: 0009698