D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] Novice with bother in Ubuntu 6.10

 

On Sun, 31 Dec 2006 02:35:19 +0000 (GMT)
trewornan <trewornan@xxxxxxxxx> wrote:

> Also, it's more usual to cd to the directory and use
> "./configure". Then if you haven't set up sudo you'll
> need to "su" before typing "make install" and possibly
> before typing "make" - best just to su first.

Umm, no. ./configure should not be run as root. Only 'make install'
ever needs to be run as root, using su sudo or anything else.

./configure can compile and run a variety of test programs that may or
may not crash, depending on what ./configure is trying to identify.
These test programs are a potential security risk and should not be run
as root. 'make' may also run test programs as well as the binaries it
has just compiled - again, these programs are NOT designed to be run as
root, they are usually test programs that check certain components of
the build process. Such scripts are not installed with the final
package and therefore never expect to be run as root. The scripts and
programs may perform a variety of checks *with the assumption* that
they are *not* root - some of these checks may fail as root, some are
downright dangerous as root.

Even when building packages that are to be installed as root,
the ./configure is run as a normal user.

> > iscan-2.4.0./configure I get the response 'no such

./ means "this directory". You could use:

directory/./program

but ./configure is a very specialised piece of kit and it needs lots of
other intermediary files in order for it to work - you MUST ALWAYS
change into the top level directory (the same directory as the
configure script) BEFORE attempting to run ./configure. There is no
shortcut here.

So, starting as normal user the process is:

$ tar -xzf foo-1.2.3.tar.gz
$ cd foo-1.2.3/
$ ./configure
$ make
optionally run
$ make check
then either
$ sudo make install
or
$ su
# make install
# exit
$

Note the change in prompt from $ as user to # as root and back to $.

Note that in many, many cases, ./configure needs to be given more
information in the form of options. Read the README file before blindly
wading into ./configure.

Common ones include --prefix or --enable-foo or --disable-foo where foo
is one component of the package itself. You get a list of these options
with ./configure --help

> > file' BUT there it sits with a value of 5.6 Mb!!
> > > I've tried home/chris/Desktop/iscan.etc BUT still

You simply must be in the same directory.

The final program can be started from anywhere, the compilation process
must start from the top level source directory, which is where you will
find the 'configure' file.

--


Neil Williams
=============
http://www.data-freedom.org/
http://www.nosoftwarepatents.com/
http://www.linux.codehelp.co.uk/

Attachment: pgp8nRXfCZ1TK.pgp
Description: PGP signature

-- 
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/linux_adm/list-faq.html