LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-07-2008, 06:47 PM   #1
cy163
LQ Newbie
 
Registered: Jun 2007
Posts: 23

Rep: Reputation: 15
question on install software package on Linux


Hello ALL,

I am not very sure about the following two questions, I have install some packages on my Linux system, though.


Q1. Should I log in as root to install a software package on a Linux system?

Q2. If I log in as a common user, say 'Mike', and install a software on Mike's home directory, then do other users on the system have the access to the software. Or I have to use 'export' to export some software libraries.


Thanks
 
Old 06-07-2008, 06:49 PM   #2
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
If you want the software to be available to all users on your system you should install it as root.

If you install it to Mike's home directory, only Mike (and whoever has access to his directory) will be able to run it. They will also only have access to the files and libraries a normal user will have.
 
Old 06-07-2008, 07:27 PM   #3
cy163
LQ Newbie
 
Registered: Jun 2007
Posts: 23

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by XavierP View Post
If you want the software to be available to all users on your system you should install it as root.

If you install it to Mike's home directory, only Mike (and whoever has access to his directory) will be able to run it. They will also only have access to the files and libraries a normal user will have.
Thanks,

>If you want the software to be available to all users on your system >you should install it as root.

Ok, i see I should install a software as root. Then another question, usually where Should I install a software on a file system, under /opt/?

>If you install it to Mike's home directory, only Mike (and whoever has >access to his directory) will be able to run it. They will also only >have access to the files and libraries a normal user will have.

I have install a software in to Mike's home directory. How to remove the software from the system COMPLETELY. In Windows system, to do this I go to 'Control Panel', and then go to 'Add and Remove software'. How to remove a software on Linux system.
 
Old 06-07-2008, 07:48 PM   #4
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
To install software on linux you should use whichever package management tools your distribution provides. This, of course, depends on the distribution that you are using.

You shouldn't install the software manually on your own unless it's for a very good reason. So, read the docs of your distro about installing/uninstalling software, or at least, let us know what distro do you use so we can tell you which is the correct tool.
 
Old 06-07-2008, 07:50 PM   #5
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
To your first question, the software will put itself wherever the packager wrote it to - whether /usr/lib or /etc or wherever. If you hand compile from a tarball, you can pass options to ./configure - the README or INSTALL file or running ./configure --help will show you the options.

Uninstalling depends very much on how you installed it. If it's from a package, your package manager will be able to uninstall. If you used checkinstall or if the developer programmed it in, running make uninstall on the tarball should uninstall it.

In extreme circumstances, you would have to find out where the files installed to and manually delete them from your system.
 
Old 06-07-2008, 08:01 PM   #6
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Putting your distro in your user profile will help us give you more specific advise. Most distros have a graphical package manager. Typically starting the package manager, you will be asked for the root password. The the package manager program will run as root. I just wanted to make sure you didn't think that you needed to log in as root to install packages. Some distros also have a command line tool you can run as well. In this case you will probably use "sudo" before the command.

There are advantages to turning to your package manager and searching for the package you want. The version of the package will be built with the library and compiler versions that your distro uses. This can prevent dependency problems. For a kde or gnome program, it may be packaged so that the menu item will show up in your desktop. Some distro's support multiple desktop managers and installing the package will install a menu item for whichever desktop you switch to. Also if there is a security patch for a particular package, a delta-package will be produced for it and your distro's update system will take care of it. If you had built a package yourself, you will need to monitor for security issues yourself, download the patch, apply the patch, rebuild and reinstall.
 
Old 06-08-2008, 08:53 AM   #7
cy163
LQ Newbie
 
Registered: Jun 2007
Posts: 23

Original Poster
Rep: Reputation: 15
Thank you all for your advices. To express my question clearly, I use a real example. Actually, I would like to install Clucene(http://sourceforge.net/project/showf...ease_id=533576), a open source text search engine, on my linux sysem.

To build, I follow these steps suggested in the instruction file INSTALL.
""""""
The following will get you building assuming that you have suffciently
recent buld tools installed.
1.) unpack tarball
2.) cd into clucene
3.) if you downloaded a tar version skip to 5
4.) run ./autogen.sh
5.) run ./configure
6.) run make
7.) things will churn for a very long time, the clucene library will
be built as well as the examples.
8.) check the src/demo, test and src directory
""""""
I have successfully install clucene on my linux system as a normal user.

However, I am not sure if this is a correct way to install software. Can other users use clucene? How to uninstall clucene in some time in the future.I can find no uninstall tool shipped with the package. How to remove clucene in this circumstances.
 
Old 06-08-2008, 10:32 AM   #8
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
Your step 9 is to either su into root (or use sudo) and then to run make install. As far as uninstalling goes, if the dev has written it in, make uninstall would remove it. You could also use a package called checkinstall which allow you to uninstall.

You don't mention your distribution of Linux. If you run a Debian based distro (debian, ubuntu, mint, etc etc) or an RPM based distro (red hat, mandriva, fedora, suse, etc etc) there may well be a package available in that distro's format which will greatly change the way you install and uninstall.
 
Old 06-09-2008, 07:15 AM   #9
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
Quote:
Originally Posted by cy163 View Post
However, I am not sure if this is a correct way to install software.
Usually, no. Unless your distro doesn't already provide packages for that software. Read my previous post, and learn to use your package manager.

Quote:
Can other users use clucene?
No, unless you "make install" it as root.

Quote:
How to uninstall clucene in some time in the future.
If you installed it with "make install", you can usually uninstall it with "make uninstall". The downside is that you need to keep the source tree. Sometimes there's an uninstall.sh script or similar. The program readme files might have instructions for that as well.
 
Old 06-09-2008, 08:33 AM   #10
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
Code:
it-etch:/$ aptitude search clucene
p   libclucene-dev                                                     - library for full-featured text search engine (development)                   
p   libclucene0ldbl                                                    - library for full-featured text search engine (runtime)    



it-etch:/$ apt-cache policy libclucene0ldbl
libclucene0ldbl:
  Installed: (none)
  Candidate: 0.9.20-3
  Version table:
     0.9.20-3 0
        500 http://ftp.uwsg.indiana.edu lenny/main Packages
I would simply


aptitude install libclucene0ldbl
aptitude remove libclucene0ldbl


No reason to build it manually, if it's already in the package repositories..

But since you don't list your distro, I guess no-one could help you determine if it's available in your distro..
Update your profile with your distro, it will make your life and ours much easier..
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
install software dependency package need very difficult. hocheetiong Linux - Newbie 1 09-11-2007 08:19 AM
Install RPM with YAST Software / Package Manager ERROR! Balarabay1 SUSE / openSUSE 5 07-10-2006 03:34 PM
mandrake 10.1 package install question MRDucks Linux - Newbie 3 08-28-2005 01:00 PM
question about install package Barq Linux - General 2 07-21-2005 09:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:42 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration