Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
01-02-2008, 05:28 AM
|
#1
|
Member
Registered: Mar 2007
Distribution: Linux Mint 18.1
Posts: 522
Rep:
|
Newbie: Ubuntu won't compile
I'm trying to compile some software using an enhanced version Ubuntu 7.10. This version was given away by a magazine and already has loads of other software installed with the basic version, including two different C++ development environments.
I call up a Konsole and do ./configure but get command/file not found message. I am aware would normally need to install the basic compilation tools, but surely having two development environments installed already, Ubuntu should be able to do this? How do I find out if the correct files have been installed to enable me to compile software from source code?
|
|
|
01-02-2008, 07:08 AM
|
#2
|
Member
Registered: Feb 2006
Location: Venezuela
Distribution: Gentoo
Posts: 453
Rep:
|
Hi,
From what you're saying I think that you're using 'configure' as if it was part of the system, I mean, a common binary or something, if that's the case, then you're wrong.
./configure is used inside a directory source of a package 'if' that package have provided a 'configure', that will check compatibility's system and set the options that will be passed to the compilers through the makefile.in
So, 'configure' is not a Linux command/binary/library, what you need to have to use it is a source package that provides its own. Not all packages do that because not all need it.
Regards
|
|
|
01-02-2008, 07:18 AM
|
#3
|
Member
Registered: Sep 2007
Location: Australia
Distribution: Gentoo / Debian / Rasbian / Proxmox
Posts: 519
Rep:
|
also you may need to run configure like this if the folder does not contain "configure" then it may be part of the MAKEFILE, so in that case, you need to run this will configure the source package, you then need to compile and install the package so generally you would run
Code:
# make
# make install
you may also want to look into finding a .deb package of that software as it avoids this whole compiling step
|
|
|
01-02-2008, 08:31 AM
|
#4
|
Member
Registered: Mar 2007
Distribution: Linux Mint 18.1
Posts: 522
Original Poster
Rep:
|
Thank you for your responses. Being an ex-Windows user I am outside my comfort zone with compiling like this! However, I'm sure it is worth learning how to do it for later on.
You are correct that I was thinking "configure" was part of the Linux system. In this instance, there is no such command in the source directory of the program I am trying to compile, but there is a 'Makefile'. Oddly enough, though, I typed Makefile at the prompt and still got a 'not found' message. I checked the case was correct and everything. I also tried 'sudo makefile', as is necessary in Ubuntu when you want to do anything as root. Do I normally need to compile as root? Perhaps I'll try sh makefile instead.
The reason I am compiling is that Linux magazines sometimes supply utilities and other goodies as source .tar files, presumably to be compatible with all the various distros of their readers, which packages might not be.
Incidentally (slightly off topic), these Linux magazines usually supply lots of dependency files as well, in case your system doesn't have them, which may be required by the software on that month's coverdisk. But how do I get their files onto my system in the right place?
|
|
|
01-02-2008, 08:35 AM
|
#5
|
LQ Addict
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464
Rep:
|
You simply run "make" to compile. make will look for the file named "makefile" or "Makefile" and use what's in it to compile the source code.
|
|
|
01-02-2008, 09:04 AM
|
#6
|
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809
|
Quote:
Originally Posted by Steve W
Incidentally (slightly off topic), these Linux magazines usually supply lots of dependency files as well, in case your system doesn't have them, which may be required by the software on that month's coverdisk. But how do I get their files onto my system in the right place?
|
Simply type the filename into the search box on your package manager. If it's not available using your PM, then Google will surely find it.
Back to another point: To run executable files by simply typing the name, the file has to be in a directory listed in $PATH. Regardless of whether the file is in a $PATH directory, the local version will be run using ./filename ("." = "current directory").
You can always run an executable by typing the full pathname--e.g. /sbin/fdisk.
|
|
|
01-02-2008, 11:01 AM
|
#7
|
Member
Registered: Mar 2007
Distribution: Linux Mint 18.1
Posts: 522
Original Poster
Rep:
|
Ah, I see. I did mean to ask the relevance of ./ under Linux systems. So if your current directory isn't listed in $PATH (which if you'd just created it, it wouldn't be) then using ./ is essential so Linux can find the file. I think this differs from Windows/DOS as the current directory is included in the path search by default.
Thanks for the help. When I get home tonight I'll have a go.
|
|
|
01-05-2008, 06:06 AM
|
#8
|
Member
Registered: Sep 2007
Location: Australia
Distribution: Gentoo / Debian / Rasbian / Proxmox
Posts: 519
Rep:
|
also "sh" runs shell files, it isnt for use with makefiles, i only suggested it because quite often when you get source code there is a file called configure.sh which you would run like "sudo sh configure.sh" without the quotation marks of course, any time there is a makefile and no configure file, just type make
|
|
|
All times are GMT -5. The time now is 01:33 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|