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

pan64 07-07-2016 07:25 AM

Quote:

Originally Posted by amanygooda (Post 5571797)
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.

you should execute that command as root, not as regular user

hazel 07-07-2016 07:36 AM

Quote:

Originally Posted by amanygooda (Post 5571797)
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.

It's telling you that you need to be root to use the apt-get command. Otherwise you don't have the right to access the database files. This ensures that only the administrator of a system can install software. In Ubuntu you become root by using the sudo command.

Try "sudo apt-get install make".

amanygooda 07-07-2016 07:53 AM

Quote:

Originally Posted by hazel (Post 5571806)
It's telling you that you need to be root to use the apt-get command. Otherwise you don't have the right to access the database files. This ensures that only the administrator of a system can install software. In Ubuntu you become root by using the sudo command.

Try "sudo apt-get install make".

I tried to use this command and I got this message:
gouda is not in the shudders file. This incident will be reported
what is that and what should I do to solve this problem

amanygooda 07-07-2016 07:57 AM

Quote:

Originally Posted by pan64 (Post 5571800)
you should execute that command as root, not as regular user

How to excite the command as root. I don't know that.
could you give me the required steps for that.

dijetlo 07-07-2016 08:01 AM

Quote:

su
type the root password at the prompt.
Welcome to the joy that is rootiness.

You just need to add gouda (gouda account name, btw) to sudoers but that can wait while you fix this.

amanygooda 07-07-2016 08:10 AM

Quote:

Originally Posted by dijetlo (Post 5571826)
type the root password at the prompt.
Welcome to the joy that is rootiness.

You just need to add gouda (gouda account name, btw) to sudoers but that can wait while you fix this.

I have entered Sudo Su command and after I entered the password then he give me this message:
gouda is not in sudoers file. This incident will be reported.

dijetlo 07-07-2016 08:14 AM

I'm sorry, I posted that and then re-read it, your right, sudo su is blocked because you aren't in sudoers.
su by itself, however, is probably available so even though it's not considered "good form", try it,
Just type "su" on the command line and the root password at the prompt, and again, sorry for any confusion,

amanygooda 07-07-2016 08:19 AM

Quote:

Originally Posted by dijetlo (Post 5571836)
I'm sorry, I posted that and then re-read it, your right, sudo su is blocked because you aren't in sudoers.
su by itself, however, is probably available so even though it's not considered "good form", try it,
Just type "su" on the command line and the root password at the prompt, and again, sorry for any confusion,

Hello ,

Under any case, don't say sorry.
Iam really appreciate your cooperation.
I tried to do what you said now.
su, then password. It give me this message:
su: Authenticated failure

What should I do then.

dijetlo 07-07-2016 08:23 AM

Are you sure it's the root password and not the one for the account "Gouda"?
SU is shorthand for "switch users", is you don't specify the user, it's assumed it's root. To make the switch you have to supply that accounts password (in this case the root account)

amanygooda 07-07-2016 08:30 AM

Quote:

Originally Posted by dijetlo (Post 5571848)
Are you sure it's the root password and not the one for the account "Gouda"?
SU is shorthand for "switch users", is you don't specify the user, it's assumed it's root. To make the switch you have to supply that accounts password (in this case the root account)

this is my account and I have used its password
I am trying to use the administrative account. but the same answer that the authentication failure.
then what is the problem

dijetlo 07-07-2016 08:52 AM

The problem seems to be you don't have the root password, and you don't have an administrative users account name and password,(or you'd be able to su using sudo ~ Admins are members of sudoers, that's normally what makes them admins). You probably need to talk to the guy running this instance, he's effectively locked you off.

John VV 07-07-2016 03:29 PM

Hi "amanygooda"

this thread is a bit of a mess and VERY CONFUSING

so "Back to the BASICS "!!!

WHERE!! did you get this tarbal from ( tar.zip/tgz/tzip...)
the only things i am finding is for Plasma Physics

a link to where you got this will be very helpful

Quote:

how I could handle this problem to download the code and activate it to be run in my computer
the issue in posts above is this
IS it a makefile set up ?????
or
dose it use Autotools????

or NONE OF THE ABOVE!!!
you say there is a *.F90 "frames_stub.f90"

as above this is FORTHAN 90( as in the year 1990 at least it is not F77 )
this means it could be VERY easy to run OR very very complex and VERY VERY difficult to run

so

until you can post a link to this software there is really not much we can do EXCEPT GUESS

and all of the posts above are just that guessing

malekmustaq 07-08-2016 08:47 AM

Quote:

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

Indeed make command cannot work if there is no make file. The archive you are getting might not be intended for building. Can you post to us what you get after extracting the archive?

What distro are you running? Where did you get that *tgz archive? If you provide us answers we might be able to help you better.

m.m.

amanygooda 07-08-2016 07:25 PM

Quote:

Originally Posted by John VV (Post 5572100)
Hi "amanygooda"

this thread is a bit of a mess and VERY CONFUSING

so "Back to the BASICS "!!!

WHERE!! did you get this tarbal from ( tar.zip/tgz/tzip...)
the only things i am finding is for Plasma Physics

a link to where you got this will be very helpful


the issue in posts above is this
IS it a makefile set up ?????
or
dose it use Autotools????

or NONE OF THE ABOVE!!!
you say there is a *.F90 "frames_stub.f90"

as above this is FORTHAN 90( as in the year 1990 at least it is not F77 )
this means it could be VERY easy to run OR very very complex and VERY VERY difficult to run

so

until you can post a link to this software there is really not much we can do EXCEPT GUESS

and all of the posts above are just that guessing

Can I sent the code and could you show the required steps to run it.
Could you send your email?
Thank you

malekmustaq 07-09-2016 05:42 AM

Quote:

Can I sent the code and could you show the required steps to run it.
Could you send your email?

amanygooda you are not listening to JohnVV. It is very simple: he wanted to know where you got the archive in *tgz in order to avoid much guessing work. You will need to stop, look (read) and listen, in order to solve the problem.

Just post the link here so that many of us can examine it and many of us can help you. Be glad and have self confidence, for many helpers are around; we help you by heart... and we help you for free. That is the beauty in LQ!

amanygooda 07-09-2016 08:29 AM

Quote:

Originally Posted by malekmustaq (Post 5573013)
amanygooda you are not listening to JohnVV. It is very simple: he wanted to know where you got the archive in *tgz to avoid much guessing work. You will need to stop, look (read) and listen, to solve the problem.

Just post the link here so that many of us can examine it and many of us can help you. Be glad and have self-confidence, for many helpers are around; we help you by heart... and we help you for free. That is the beauty in LQ!

Hello and thank you for helping;
I don't have the link for the code.
I just have the code itself and my professor asked me to modify it and compile it again with the new modification in order to study the new case.
so I don't have a link for the code itself , I have files of the code.
So, I asked for an email to send them.
This is the full picture of my situation.


All times are GMT -5. The time now is 03:54 PM.