LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   question on install software package on Linux (https://www.linuxquestions.org/questions/linux-newbie-8/question-on-install-software-package-on-linux-647702/)

cy163 06-07-2008 06:47 PM

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

XavierP 06-07-2008 06:49 PM

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.

cy163 06-07-2008 07:27 PM

Quote:

Originally Posted by XavierP (Post 3177899)
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.

i92guboj 06-07-2008 07:48 PM

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.

XavierP 06-07-2008 07:50 PM

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.

jschiwal 06-07-2008 08:01 PM

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.

cy163 06-08-2008 08:53 AM

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.

XavierP 06-08-2008 10:32 AM

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.

i92guboj 06-09-2008 07:15 AM

Quote:

Originally Posted by cy163 (Post 3178271)
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.

farslayer 06-09-2008 08:33 AM

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..


All times are GMT -5. The time now is 11:02 AM.