how to install a program from source

Asked by Derrick Matthews

can somebody please give me step by step instructions on how exactly to compile a program from source to install it, step by step instructions or a good example looking around in other forums they skip steps like cd commands which I googled but still ain't helping because I can get to where the zip file is extracted but can't choose it at all so I can't configure it so just to give more detail I download the source for the new mupen64plus 1.99.4 and extracted it in my downloads folder, what do I need to do to install it please if you don't mind give me step by step instructions.

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu software-center Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
arochester (arochester) said :
#1

"Compiling things on Ubuntu the Easy Way" - https://help.ubuntu.com/community/CompilingEasyHowTo
"Installing Software in Ubuntu" - http://www.psychocats.net/ubuntu/installingsoftware
"How To Install Anything In Ubuntu – A Compilation Of All Methods" - http://enli.co.cc/tutorials/how-to-install-anything-in-ubuntu-a-compilation/

Revision history for this message
Derrick Matthews (drrckmtthws) said :
#2

I been to all these sites and non of them are helping out with the cd commands using the ones I've seen via these same forums other forums and youtube keeps yielding the same results come time to configure, file or folder not found.

Revision history for this message
Derrick Matthews (drrckmtthws) said :
#3

to be exact it says no such directory

Revision history for this message
Derrick Matthews (drrckmtthws) said :
#4

keep getting no such file or directory what am I doing wrong

Revision history for this message
arochester (arochester) said :
#5

Are you navigating to the uncompressed file before you start compiling?

Revision history for this message
Derrick Matthews (drrckmtthws) said :
#6

I thought I was this is exactly what I have been doing first I download mupen64plus 1.99.4 tar and extracted it to the desktop then i open up the terminal and type cd(space) then drag the folder right into the terminal because it's easier then doing a bunch of cd commands to get to the same destination, after that I hit enter and finally try to ./configure and thats when I end up getting no such file or directory

Revision history for this message
Manfred Hampl (m-hampl) said :
#7

I have never tried to compile mupen64plus myself (not even downloaded it), so I cannot tell the exact steps you have to do, but I can give some generic advice.

I understand that you have already downloaded the tar file.
First step is to unpack it with a "tar x..." command. If the source is "...tar" the tar command has to be "tar xvf...", if the source is "...tar.gz" the tar command has to be "tar xzvf...", if the source is "...tar.bz2" the tar command has to be "tar xjvf...", etc. So you have to make sure to issue the right command.
You also have to decide where the unpacked source should reside, some usually used paths are /usr/local/src/, or ~/source/ (that is a "source" subdirectory below your home director), or a directory on your desktop etc. Please decide for yourself.

The unpack command will usually create a subdirectory with name and version of the software (in your case something like mupen64plus-1.99.4). For the next steps you have to "cd" into that directory.
To confirm that you are really there please issue the "pwd" and "ls" commands.

Depending on the software that you are trying to build there might be different files in that directory, maybe a "configure" script, maybe a "README" file that tells how to compile, maybe a "makefile" file that is used by the "make" command, etc.etc.
You have to check which of the files you have to call for building the software, that might differ!

If you execute the "cd ..." command to that directory, issue the "ls -la" command and copy and paste the output as a new message to this question, we might be able to help you further.

Revision history for this message
Manfred Hampl (m-hampl) said :
#8

Just searched the web and found on http://code.google.com/p/mupen64plus/ several downloads. Which one did you download?
mupen64plus-bundle-linux32-1.99.4-ubuntu.tar.gz and mupen64plus-bundle-linux64-1.99.4-ubuntu.tar.gz in fact are binary packages, not source packages. you need just to execute the install script. Most probably "sudo ./install.sh" is the right command for that.

The source package mupen64plus-bundle-src-1.99.4.tar.gz really needs compilation, but I would recommend to try the binary package first. For the source package I expect that the commands "sudo ./m64p_build.sh" and "sudo ./m64p_install.sh" would be the right ones.

Revision history for this message
Derrick Matthews (drrckmtthws) said :
#9

I downloaded the source, but I have also tried downloading the binary packages and every time I tried to do the sudo ./install.sh it didn't work but I will try it out again,

Revision history for this message
Emmanuel Thomas-Maurin (manu-tm) said :
#10

I don't know if it will help but the standard way of building from sources is opening a terminal, then type:

apt-get source PACKAGE_NAME
(or, if you have already downloaded the package: tar xvf PACKAGE_NAME.tar.gz)

cd PACKAGE_NAME_VERSION_NUMBER
./configure
make
sudo make install

Can you help with this problem?

Provide an answer of your own, or ask Derrick Matthews for more information if necessary.

To post a message you must log in.