LinuxQuestions.org
Visit Jeremy's Blog.
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 09-03-2007, 02:32 AM   #1
zigoto
LQ Newbie
 
Registered: Feb 2004
Posts: 21

Rep: Reputation: 0
Uninstall rpm


I am using openSuse-10.2.
I want to uninstall gtk-2.10.6 in order to install gtk-2.10.13 from sources (no available rpm).

If I try uninstalling with Yast, I get a long list of other programs using gtk also, and several different options for each. I can't understand how to manage that. I tried some options, and I had to
reinstall Suse!... :-(

I also tried rpm -e gtk-2.10.6. I get a list of dependencies and the rpm is not uninstalled.
I didn't use --force nor --nodeps because I don't know what will happen.

How can I manage this uninstall- install?
 
Old 09-03-2007, 03:11 AM   #2
malan_in
LQ Newbie
 
Registered: Sep 2007
Distribution: redhat, debian, suse, fedora, ubuntu
Posts: 18

Rep: Reputation: 0
Wink

Quote:
Originally Posted by zigoto View Post
I am using openSuse-10.2.
I want to uninstall gtk-2.10.6 in order to install gtk-2.10.13 from sources (no available rpm).

If I try uninstalling with Yast, I get a long list of other programs using gtk also, and several different options for each. I can't understand how to manage that. I tried some options, and I had to
reinstall Suse!... :-(

I also tried rpm -e gtk-2.10.6. I get a list of dependencies and the rpm is not uninstalled.
I didn't use --force nor --nodeps because I don't know what will happen.

How can I manage this uninstall- install?

if you want to ignore the dependencies use --nodeps on command line
 
Old 09-03-2007, 03:20 AM   #3
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 74
If you have other packages that rely on gtk2 that were installed via rpm, then rpm or any of its frontends will not allow you to uninstall gtk2 without the --nodeps option. The options you have are to use the --nodeps option when uninstalling (which is obviously risky and could break other packages) or alternatively use the gtk2 packages from the stable gnome yast repo.
 
Old 09-03-2007, 03:26 AM   #4
b0uncer
LQ Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
Another solution would be to configure the new gtk sources so that when you compile and install it, you use a prefix that installs the thing into a different place than where the rpm version is. Therefore you could have two gtk packages installed simultaneously..but if it's of any use is another matter; you would probably have to compile a lot of other programs from source as well, to tell them to use the new gtk from the new place instead of the "default" one, so I don't think it's what you really want.

Your best bet would be to try and find an rpm package for the newer gtk version. If it's not available, you could also build your very own rpm package from the gtk sources, and use that to upgrade your gtk via rpm; though I'm pretty sure it's easier to find an existing rpm for gtk than start building your own.
 
Old 09-03-2007, 09:49 AM   #5
berbae
Member
 
Registered: Jul 2005
Location: France
Distribution: Arch Linux
Posts: 540

Rep: Reputation: Disabled
Hi
You can find a gtk2-2.10.11 package (it's gtk2 not gtk) in OpenSuse repositories/ under GNOME: STABLE and go down to where concerns your installation.
It's somewhat newer although not the last release, but certainly safer to use an official SUSE rpm package.
Good luck!
 
Old 09-03-2007, 03:57 PM   #6
zigoto
LQ Newbie
 
Registered: Feb 2004
Posts: 21

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by reddazz View Post
If you have other packages that rely on gtk2 that were installed via rpm, then rpm or any of its frontends will not allow you to uninstall gtk2 without the --nodeps option. The options you have are to use the --nodeps option when uninstalling (which is obviously risky and could break other packages) or alternatively use the gtk2 packages from the stable gnome yast repo.
Before using the --nodeps option, I want to know what this options does. It's not clear for me
 
Old 09-03-2007, 04:11 PM   #7
zigoto
LQ Newbie
 
Registered: Feb 2004
Posts: 21

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by b0uncer View Post
Another solution would be to configure the new gtk sources so that when you compile and install it, you use a prefix that installs the thing into a different place than where the rpm version is. Therefore you could have two gtk packages installed simultaneously..but if it's of any use is another matter; you would probably have to compile a lot of other programs from source as well, to tell them to use the new gtk from the new place instead of the "default" one, so I don't think it's what you really want.

Your best bet would be to try and find an rpm package for the newer gtk version. If it's not available, you could also build your very own rpm package from the gtk sources, and use that to upgrade your gtk via rpm; though I'm pretty sure it's easier to find an existing rpm for gtk than start building your own.
Usually, rpm installs in /usr and make install in /usr/local/
I tried installing with make install keeping the rpm : the configure process of the program finds the old version, not the new one.
How to tell a program to use the new version?

The newest rpm I can find is gtk2-2.10-11 and gimp-2.4-rc1 needs version >=2.10.13.
How can I build my own rpm from source, and then upgrade my old gtk2?
Couls you, please, give me a detailed procedure?
 
Old 09-03-2007, 04:47 PM   #8
berbae
Member
 
Registered: Jul 2005
Location: France
Distribution: Arch Linux
Posts: 540

Rep: Reputation: Disabled
You can try to generate a binary rpm package after compiling gtk2 from source. You have two choices available :
1) recompile gtk2 using ./configure with the same prefix as the SUSE installation, then 'make', but after that, instead of using 'make install' under root, run under root 'checkinstall' which will generate a binary rpm package installable with the rpm command.
Of course you have to install the checkinstall utility first. You'll find it under /10.2/repo/oss/suse/
go down to where concerns your installation.
2) build a binary rpm package using the 'rpmbuild' command, you must use for that the .spec file in the source rpm file for gtk2-2.10.11 (with the .src.rpm extension), and change it to build the gtk2-2.10.13 release instead.
I think that this second way will be more in line with the SUSE distro.

Yes it's tedious but you can learn much doing that.
Edit : I should have written complicated, sorry.

A last word to tell that OpenSuse is not the most practical Linux distro to compile programs from source. If you really want to compile more easily you should consider choosing another distro like Arch Linux or Gentoo, or maybe Slackware, ...
Good luck!

Last edited by berbae; 09-04-2007 at 03:15 PM.
 
Old 09-03-2007, 05:56 PM   #9
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 74
Quote:
Originally Posted by zigoto View Post
Before using the --nodeps option, I want to know what this options does. It's not clear for me
The manual (man rpm) states what each option does. If you use that option, rpm will not check for any dependencies when installing, upgrading or uninstalling a package. As for what will happen, packages that rely on gtk2 will probably work until you install the version you compiled from source.
 
Old 09-04-2007, 02:50 AM   #10
zigoto
LQ Newbie
 
Registered: Feb 2004
Posts: 21

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by berbae View Post
You can try to generate a binary rpm package after compiling gtk2 from source. You have two choices available :
1) recompile gtk2 using ./configure with the same prefix as the SUSE installation, then 'make', but after that, instead of using 'make install' under root, run under root 'checkinstall' which will generate a binary rpm package installable with the rpm command.
Of course you have to install the checkinstall utility first. You'll find it under /10.2/repo/oss/suse/
go down to where concerns your installation.
2) build a binary rpm package using the 'rpmbuild' command, you must use for that the .spec file in the source rpm file for gtk2-2.10.11 (with the .src.rpm extension), and change it to build the gtk2-2.10.13 release instead.
I think that this second way will be more in line with the SUSE distro.

Yes it's tedious but you can learn much doing that.
Not tedious at all. Complex and impressive.
I need some explanation
- "using ./configure with the same prefix as the SUSE installation" : what is the Suse installation prefix?

- "you must use for that the .spec file in the source rpm file for gtk2-2.10.11 (with the .src.rpm extension), and change it to build the gtk2-2.10.13 release instead." : change it? How? What must I change in this .spec file?
 
Old 09-04-2007, 08:31 AM   #11
berbae
Member
 
Registered: Jul 2005
Location: France
Distribution: Arch Linux
Posts: 540

Rep: Reputation: Disabled
To reddazz
Do you mean rather :
Quote:
As for what will happen, packages that rely on gtk2 will probably not work until you install the version you compiled from source.
To zigoto
1)
Quote:
what is the Suse installation prefix?
You can find it by running a 'rpm -ql' command and looking where it is installed (instead of the default /usr/local directory), maybe /opt/gnome in SUSE but I'm not sure. Also take care to name the package the same way as SUSE, that is using gtk2-2.10.13 not gtk+-2.10.13
This first way of generating a binary rpm package is by far easier than the second I mentioned to you, but it will produce a not standard SUSE rpm package, though a working one (for example the header files will be included in the package, and not in a separate package gtk2-devel-2.10.13).
2)
Quote:
change it? How? What must I change in this .spec file?
The .spec file is a simple text file which you can edit with a text editor.
I can try to give some details.
After downloading the gtk2-2.10.11 .src.rpm file from the src directory of the repo, install it using 'rpm -U' under root.
You should obtain the needed files to build the binary package in the /usr/src/packages directory:
in the SOURCES sub-directory the gtk+-2.10.11.tar.bz2, the patches and other files.
in the SPECS sub-directory the gtk2.spec file

What you must change is the .tar.bz2 to a downloaded gtk+-2.10.13.tar.bz2
and you must edit the gtk2.spec with a text editor, to replace everything from 10.11 to 10.13 (version and release number).
You need to have installed all the packages listed in the 'BuildRequires:' directive.
And finally run the rpmbuild command (should work as a simple user):
cd /usr/src/packages/SPECS
rpmbuild -bb gtk2.spec

Try and adapt the things which may not be correct. (for example I don't know if the patches are good for the new release, but they probably are)
If everything goes well you should get the binary rpm file under the /usr/src/packages/RPMS directory.

Last edited by berbae; 09-04-2007 at 12:04 PM.
 
Old 09-05-2007, 03:20 AM   #12
zigoto
LQ Newbie
 
Registered: Feb 2004
Posts: 21

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by berbae View Post

To zigoto
1)

You can find it by running a 'rpm -ql' command and looking where it is installed (instead of the default /usr/local directory), maybe /opt/gnome in SUSE but I'm not sure. Also take care to name the package the same way as SUSE, that is using gtk2-2.10.13 not gtk+-2.10.13
This first way of generating a binary rpm package is by far easier than the second I mentioned to you, but it will produce a not standard SUSE rpm package, though a working one (for example the header files will be included in the package, and not in a separate package gtk2-devel-2.10.13).
I found tutorials about checkinstall : it looks simple to use, at least
with a new program. I didn't find explanations when an old program exists.
I am afraid of testing without knowing what I do, because I had to reinstall Suse twice after such testings.
I think there are two steps:
1- Uninstall old gtk2: is
#rpm -e gtk2-2.10.6-13 i586 --nodeps
the right command?

2- Build and install the new gtk rpm
cd gtk+-2.10.14
./configure
make
#make checkinstall
Normally, I should get a rpm file that I will install with
rpm -i Thisrpm

I still don't understand the prefix you told me.
rpm -ql gtk2 gives a long list of pathes. Which one is to be used? In that case, I must not uninstall the old gtk?
All this is unclear for me.
 
Old 09-05-2007, 09:49 AM   #13
berbae
Member
 
Registered: Jul 2005
Location: France
Distribution: Arch Linux
Posts: 540

Rep: Reputation: Disabled
Quote:
I think there are two steps:
1- Uninstall old gtk2: is
#rpm -e gtk2-2.10.6-13 i586 --nodeps
the right command?
If you have a newer package available as a binary rpm file, you don't need to uninstall the previous one first, just upgrade it with :
rpm -U gtk2-2.10.14-1.i586.rpm
This command will also uninstall the old version automatically.
But the new name should match the old one :
gtk2-2.10.6-13 to gtk2-2.10.14 (not gtk+-2.10.14)
Quote:
2- Build and install the new gtk rpm
cd gtk+-2.10.14
./configure
make
#make checkinstall
Normally, I should get a rpm file that I will install with
rpm -i Thisrpm
you have to give a prefix to the configure script, to install at the same place as the SUSE package, rather than at the default /usr/local .
To find the prefix, you run against the current installed gtk2 :
rpm -ql gtk2-2.10.6-13
you get something like :
Quote:
/etc/opt/gnome/gtk-2.0
/etc/opt/gnome/gtk-2.0/gdk-pixbuf.loaders
/etc/opt/gnome/gtk-2.0/gtk.immodules
/etc/opt/gnome/gtk-2.0/gtkrc
/etc/profile.d/gtk2.csh
/etc/profile.d/gtk2.sh
/opt/gnome/bin/gdk-pixbuf-query-loaders
/opt/gnome/bin/gtk-query-immodules-2.0
/opt/gnome/bin/gtk-update-icon-cache
/opt/gnome/lib/gtk-2.0
/opt/gnome/lib/gtk-2.0/2.10.0
/opt/gnome/lib/gtk-2.0/2.10.0/engines
/opt/gnome/lib/gtk-2.0/2.10.0/engines/libpixmap.so
/opt/gnome/lib/gtk-2.0/2.10.0/filesystems
/opt/gnome/lib/gtk-2.0/2.10.0/immodules
/opt/gnome/lib/gtk-2.0/2.10.0/immodules/im-am-et.so
/opt/gnome/lib/gtk-2.0/2.10.0/immodules/im-cedilla.so
/opt/gnome/lib/gtk-2.0/2.10.0/immodules/im-cyrillic-translit.so
/opt/gnome/lib/gtk-2.0/2.10.0/immodules/im-inuktitut.so
/opt/gnome/lib/gtk-2.0/2.10.0/immodules/im-ipa.so
...
So the prefix is /opt/gnome, which you will give to the configure script:
./configure --prefix=/opt/gnome
make
#checkinstall (not make checkinstall)
The utility will ask you questions about the rpm package to generate, take care to name the package gtk2 not gtk+ , with the right version and release numbers.
After you've got the binary rpm file, you can upgrade your installation:
cd <where the rpm file is>
rpm -U gtk2-2.10.14-1.i586.rpm
ldconfig
You should run the command 'ldconfig' under root, because, as it is not a SUSE package, the command will not be ran automatically.
If something doesn't go well after that, you don't need to reinstall everything, just downgrade to the old gtk2 version with :
rpm -U --oldpackage gtk2-2.10.6-13.i586.rpm
If you don't have it download it from an OpenSUSE repo.
This should restore everything as it was before the upgrade.

Personnally, I would have preferred the second method with rpmbuild, because one generates SUSE packages with it, and it's always preferable to stay in line with the current installed distro. But you could test it also some time, if you want. I strongly recommend you this second method.

Last edited by berbae; 09-05-2007 at 10:24 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Uninstall RPM manojg Linux - Newbie 3 10-09-2007 12:53 PM
uninstall an rpm csvke Linux - Newbie 3 01-28-2004 09:59 PM
rpm uninstall mikemrh9 Linux - Newbie 1 11-26-2003 09:56 PM
RPM uninstall hamish Linux - Newbie 2 09-05-2003 04:36 PM
can't uninstall all RPM once all !! hitesh_linux Linux - Software 1 07-08-2003 02:18 PM


All times are GMT -5. The time now is 02:49 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration