Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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
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.
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.
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!
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
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?
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!
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.
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?
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.
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.
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 :
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.