LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   uninstalling before installing? (https://www.linuxquestions.org/questions/linux-newbie-8/uninstalling-before-installing-242938/)

xinelo 10-15-2004 07:01 AM

uninstalling before installing?
 
Hi!

I've read there might be problems if I reinstall a package without uninstalling it first.

Perl came installed by default with my Linux distro. Now I'm planning to install XAMPP (former LAMPP), which brings Perl too.

The question is: do I need to uninstall the current Perl installation before I install XAMPP?

If no, that's that.

If yes, do I just need to remove the Perl directory (which I imagine to be /usr/bin/perl) or do I need to use apt-get (--purge) remove <perl??> or dpkg --purge <perl??> or something of the like?

If yes, is this regardless of the versions? I mean, maybe if I'm not going to install the same version of Perl there won't be any compatibility issue... If so, how do I know what version my current Perl is?

Thank you very much for any help.
Xinelo

rjlee 10-15-2004 07:56 AM

Re: uninstalling before installing?
 
Quote:

Originally posted by xinelo
I've read there might be problems if I reinstall a package without uninstalling it first.
Yes. Most installers won't let you do that.

Quote:

Perl came installed by default with my Linux distro. Now I'm planning to install XAMPP (former LAMPP), which brings Perl too.
How do you mean “it brings Perl too”? Normally, a package will list its dependencies rather than bundling them in the same package file; in which case it won't install Perl for you. You will need to have Perl installed before you can install XAMPP (although some installers will install it for you if you don't have it).

I just checked the xampp web page; it seems to be a replacement for Apache+mod_perl. If so, I'd be very surprised if it didn't use the version of Perl on your system.

Quote:

The question is: do I need to uninstall the current Perl installation before I install XAMPP?
Only if XAMPP provides Perl, rather than has a dependency of Perl.

Quote:

If yes, do I just need to remove the Perl directory (which I imagine to be /usr/bin/perl) or do I need to use apt-get (--purge) remove <perl??> or dpkg --purge <perl??> or something of the like?
I don't recommend removing the perl directory. /usr/bin/perl is usually a file; you want /usr/share/perl or similar. You will also need to delete /usr/bin/perl and /usr/lib/libperl*.{so,a} You should only really do this if you installed it from source; if you're using an installer, it's best to use that. rpm, apt-get and dpkg are examples of installers; uninstall it with whatever you originally installed it with. I can't tell you what that is because I don't know which distro' you're using.

Quote:

If yes, is this regardless of the versions? I mean, maybe if I'm not going to install the same version of Perl there won't be any compatibility issue... If so, how do I know what version my current Perl is?
There will be a problem if you try and install different versions of Perl, or even the same version compiled with different options, to the same place. You can find out what version you're running with
Code:

perl --version
.

My advice is to try and install the XAMPP package. If it needs you to uninstall, reinstall or upgrade Perl, it will tell you.

xinelo 10-15-2004 10:48 AM

Hi rjlee,

Thanks a lot for your kind and useful reply! I'm not too sure I understand everything you say but that's good (so I have to learn ;)) I forgot to say that I'm newbie (but I think it's obvious and on the other hand I find it dull to say that every time I ask for help). You'll see:

First of all, some INFORMATION (sorry about not mentioning this earlier):

1. My distro: GNU/LinEx (based on debian)

2. "$ perl --version" outputs "This is Perl, v.5.8.3 built for i386-linux-..."

3. Extracting the XAMMP1.4.9.tar.gz file creates a directory called 'lampp', where among other files there is the RELEASENOTES. They say "This version of XAMPP includes bla bla MySQL, PHP4, PHP5, Apache bla bla and Perl 5.8.4 ".

This is what I meant by "it brings Perl too". Maybe I didn't express properly or maybe I don't understand what "XAMPP includes Perl" means. Also, I haven't got yet a clear picture of what dependencies are, so understand only roughly what you say about them. The thing is I just thought XAMPP would install Perl 5.8.4, was I wrong?

Secondly, DOUBTS:

Quote:

Only [need you to uninstall Perl] if XAMPP provides Perl, rather than has a dependency of Perl.
Judging by the above information (from the release notes), I think XAMPP does provide Perl, so I think I need to uninstall. However I haven't been able to follow well your explanation at this point. You say:

Quote:

I don't recommend removing the perl directory. /usr/bin/perl is usually a file; you want /usr/share/perl or similar. You will also need to delete /usr/bin/perl and /usr/lib/libperl*.{so,a}
So, if I understand, I have to remove:
/usr/bin/perl
/usr/lib/libperl.so.5.8.3
/usr/share/perl
?? (not too sure about this one)

Quote:

You should only really do this if you installed it from source (...) uninstall it with whatever you originally installed it with.
Well, the thing is I didn't install it myself. It came with my distribution. So I guess I just need to remove the abovesaid dirs/files (I'll make a backup first, just in case).

Quote:

My advice is to try and install the XAMPP package. If it needs you to uninstall, reinstall or upgrade Perl, it will tell you.
This is want I'm going to do. Cross your toes! ;)

I forgot to mention that the installation manual says:

Quote:

tar xvfz xampp-linux-1.4.9a.tar.gz -C /opt
Warning 2: already installed XAMPP versions get overwritten by this command.
Which is not the case, but it might be that that command also overwrittens already installed components. I don't know...

And thanks again.
Xinelo

rjlee 10-15-2004 06:39 PM

Don't start deleting directories. With Debian, you can use apt-get to uninstall Perl.
Try something like
Code:

apt-get --remove perl
If I write a program called “bob” that uses the standard C library, and I package it up, then my package will provide “bob”.

It would be silly to include the standard C library, because it's quite common and you'll probably have it already. Other people have already packaged it. But you need to have it, so I mark the standard C library as a dependency of my package; it's not something it provides, but it's something it needs.

I do not know if Perl is a dependency of Xampp, or is provided by it.

If you're untarring into /opt, then you won't overwrite anything that isn't inside /opt. (Your installer should only put commercial software in /opt, and Perl isn't that, so you won't overwrite or damage your existing Perl by installing it).

xinelo 10-16-2004 01:54 PM

didn't need to uninstall
 
Thank you very much for your help and your explanation of what dependencies are. They seem to be just what my common sense told they should be (confirmed by recent readings and your own explanation). Actually their name is quite logical!

I do not think Perl is a dependency of Xampp, I rather think it is provided by it. XAMPP is a package which one uses if one doens't want to bother to install Apache, MySQL and PHP separately. So it installs these three componentes without any need to configure anything manually. But the thing, if I got it right, is that it also installs other things, such as Perl.

So what I've gone is just follow the instructions and install to /opt. There have been no problems and it works perfectly. Maybe I've been too cautious but you never know, and I was quite sure I can't reinstall without uninstalling first. But all is clear now.

Thanks again rjlee for your precious help. Have a good weekend!
Xinelo


All times are GMT -5. The time now is 06:20 PM.