-1

While I am executing command

**VERS=$(lsb_release -cs)
sudo sh -c "echo deb http://www.openfoam.org/download/ubuntu $VERS main > /etc/apt**/sources.list.d/openfoam.list"*][1]* 

I have a file openfoam.list But output of sudo apt-get install openfoam221 is

N: Ignoring file 'openfoam221_0-1_i386.deb' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
N: Ignoring file 'openfoamlist' in directory '/etc/apt/sources.list.d/' as it has no filename extension
N: Ignoring file 'openfoam221_0-1_i386.deb' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
N: Ignoring file 'openfoamlist' in directory '/etc/apt/sources.list.d/' as it has no filename extension
N: Ignoring file 'openfoam221_0-1_i386.deb' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
N: Ignoring file 'openfoamlist' in directory '/etc/apt/sources.list.d/' as it has no filename extension
E: Unable to locate package openfoam221

image

BuZZ-dEE
  • 14,223
atul
  • 1
  • 1
  • 1

1 Answers1

1

Ok, I really would love that you explain a bit what are you trying to do, but lets cleanup the mess:

sudo rm /etc/apt/sources.list.d/openfoam*

Now, I'm assuming that somewhere you are typing bad something, here is how is being done:

sudo sh -c "echo deb http://www.openfoam.org/download/ubuntu $(lsb_release -cs) main > /etc/apt/sources.list.d/openfoam.list"

Now lets check the file using cat:

braiam@bt:~$ cat /etc/apt/sources.list.d/openfoam.list 
deb http://www.openfoam.org/download/ubuntu raring main

Now everything is ok, you can update and install whatever you want.

sudo apt-get update
sudo apt-get install openfoam221
Braiam
  • 67,791
  • 32
  • 179
  • 269