LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   I have a problem in downloading a code (https://www.linuxquestions.org/questions/linux-newbie-8/i-have-a-problem-in-downloading-a-code-4175583965/)

amanygooda 07-07-2016 01:06 AM

I have a problem in downloading a code
 
Hello Members;

I am a beginner in using linux. I found a difficulty to download and compile a code.
the source is in tgz.
I want to download fiscof 2 on a new computer and I couldn't.
I did the following steps:
1. extract files from tgz file by using gnu zip command
2. I tried to use make command by this way;
make -f fiscof2-237.tgz
but there is a message like that
fiscof2-237.tgz:1:*** missing operator. stop.

how I could handle this problem to download the code and activate it to be run in my computer

hazel 07-07-2016 01:38 AM

A tarball is not just a zipped file. It's a compacted archive which has to be unpacked using the tar command. The correct syntax is tar -xf filename. This creates a directory which you must enter using cd directoryname. Now list the files. There should be a README and perhaps an INSTALL. Read them carefully and they will tell you what to do next.

The commonest sequence of operations is
Code:

./configure
make
(become root)
make install

About 90% of packages can be built this way. If there is something different that you must do, there will be instructions for doing it.

pan64 07-07-2016 01:39 AM

you need to extract *.tgz with tar:
Code:

tar xf <filename>.tgz
you will get a lot of files, probably there will be a readme or similar. That will instruct how to continue

amanygooda 07-07-2016 01:58 AM

I have found poor information regarding installing the code in the readme file just only the following sentence:
what should I do after that.

Built-in simultaneous visualization functions are depended on
two libraries, namely "Frames" and "gdf".
As line charts and contour plots for physical values are depended
on "Frames", you must install "Frames" first.
If you do not want to use these features, you need not install
"Frames" and you must use "frames_stub.f90" instead of "frames.f90"
in Makefile.
As animation GIF files for physical values are depended on "gdf",
you must install "gdf" first.
If you do not want to use these features, you need not install "gdf"
and you must use "gdfx_stub.f90" instead of "gdfx.f90" in Makefile.

hazel 07-07-2016 05:57 AM

Where did you get this package from? Can you give us a link? It will be easier to work out what is going on if people can actually look at the files themselves.

Files with an .f90 suffix are written in Fortran, and that's unusual for Linux software.

amanygooda 07-07-2016 06:36 AM

every time, I am trying to use makefile the answer is : command not found.
I tried to download it from this webpage:
https://www.gnu.org/software/make/
after I download makefile, I find also the same problem for Makefile command and make -f command
always there is message that :
f951:error: code model 'medium' not supported in the 32 bit mode.
make:***[parameter.mod] Error 1

How to solve this problem to could compile my code

pan64 07-07-2016 06:39 AM

what kind of os is it?

amanygooda 07-07-2016 06:42 AM

it is :
linux sms 3.2.0-67-generic-pae #101-Ubuntu SMP Tue Jul 14 18:04:54 UTC 2014 i686 athlon i386 GNU/Linux

pan64 07-07-2016 06:43 AM

so you should try:
apt-get install make
or similar to install make, do not download "something"

amanygooda 07-07-2016 06:52 AM

there is a message :
No command apt found.
are you sure from the command

hazel 07-07-2016 06:54 AM

You certainly should never try to build a standard program like make! Always get that sort of thing through your package manager. This isn't Windows you're using. In Linux you don't wander all over the Internet looking for software. You get it from your distribution's repository, using the package manager provided (which in your case means apt-get or synaptic).

Even with more obscure software like this fiscof thing, always try the repository first. You will probably find it there, especially with a big distro like Ubuntu. Building from source is the last resort unless you're doing it for fun or to prove something.

PS: the command isn't apt, it's apt-get.

malekmustaq 07-07-2016 06:54 AM

Quote:

I am a beginner in using linux. I found a difficulty to download and compile a code.
the source is in tgz.

Usually --though not always-- a package of "*.tgz" name is an installable package as used in Slackware, whereby, if you are running a Slackware you only need to do--
Code:

sudo /sbin/installpkg foo.tgz
and the package installs. If it is not a Slackware package then it is an ordinary archive you can extract using "tar -xzf foo.tgz" then you may use whatever it extracted.

Comparatively, the usual and commonly used packaging for source files for building or compilation is *tar.bz <.bz2 or .tbz> which is extractable by the same tar or bzip2 command. Read manual
Code:

man bzip2
man tar

.If you have this *tar.bz2 kind of package for building or compilation only few things are needed to build, compile and install. Here is an example:
Code:

tar xjf foo.tar.bz2
cd foo/
./configure
make
sudo make install

If all things are normal and no dependency is wanting the build, compile and install should succeed.

Quote:

I did the following steps:
1. extract files from tgz file by using gnu zip command
2. I tried to use make command by this way;
make -f fiscof2-237.tgz

Configure first, then make, then install as hinted above.
Quote:


but there is a message like that
fiscof2-237.tgz:1:*** missing operator. stop.

An error of course. Try to read the manual for command "make" by invoking in the terminal
Code:

man make
Always remember the manual is your closest friend.

Hope that helps. Good luck.

m.m.

amanygooda 07-07-2016 07:06 AM

Quote:

Originally Posted by malekmustaq (Post 5571782)
Usually --though not always-- a package of "*.tgz" name is an installable package as used in Slackware, whereby, if you are running a Slackware you only need to do--
Code:

sudo /sbin/installpkg foo.tgz
and the package installs. If it is not a Slackware package then it is an ordinary archive you can extract using "tar -xzf foo.tgz" then you may use whatever it extracted.

Comparatively, the usual and commonly used packaging for source files for building or compilation is *tar.bz <.bz2 or .tbz> which is extractable by the same tar or bzip2 command. Read manual
Code:

man bzip2
man tar

.If you have this *tar.bz2 kind of package for building or compilation only few things are needed to build, compile and install. Here is an example:
Code:

tar xjf foo.tar.bz2
cd foo/
./configure
make
sudo make install

If all things are normal and no dependency is wanting the build, compile and install should succeed.


Configure first, then make, then install as hinted above.
An error of course. Try to read the manual for command "make" by invoking in the terminal
Code:

man make
Always remember the manual is your closest friend.

Hope that helps. Good luck.

m.m.




also your steps is not working, I don't know what is the problem. no makefile command exist and make -f fiscof2.f90 is error.
How I can build up and install the code after I extracted it by tar command

amanygooda 07-07-2016 07:22 AM

Quote:

Originally Posted by hazel (Post 5571781)
You certainly should never try to build a standard program like make! Always get that sort of thing through your package manager. This isn't Windows you're using. In Linux you don't wander all over the Internet looking for software. You get it from your distribution's repository, using the package manager provided (which in your case means apt-get or synaptic).

Even with more obscure software like this fiscof thing, always try the repository first. You will probably find it there, especially with a big distro like Ubuntu. Building from source is the last resort unless you're doing it for fun or to prove something.

PS: the command isn't apt, it's apt-get.


Hello I tried your command apt-get install make
there is a message as following:
E: couldn't open lock file /var/lib/dpkg/lock -open(13:permission denied)
E:Unable to lock the administration directory (/var/lib/dpkg/), are you root?


what this message mean. How to solve my problem regard make.

amanygooda 07-07-2016 07:22 AM

Quote:

Originally Posted by hazel (Post 5571656)
A tarball is not just a zipped file. It's a compacted archive which has to be unpacked using the tar command. The correct syntax is tar -xf filename. This creates a directory which you must enter using cd directoryname. Now list the files. There should be a README and perhaps an INSTALL. Read them carefully and they will tell you what to do next.

The commonest sequence of operations is
Code:

./configure
make
(become root)
make install

About 90% of packages can be built this way. If there is something different that you must do, there will be instructions for doing it.



I tried this steps but also it doesn't work. could you give me other ideas


All times are GMT -5. The time now is 07:17 AM.