Thursday, May 04, 2006

» How to install and use smart on SUSE Linux 10.1

As a complement to one of my previous blog entries about setting up smart on 10.1RC, I've seen a few people struggle to install smart on their 10.1 in the first place, so here's a short wrapup on how to do that.

Installing rpm-python

Smart has only one requirement, besides python (that should be always installed by default anyway), that's rpm-python (RPM bindings for python). rpm-python is not installed by default, so you will have to pull that one first. Let's assume that your current zmd/yast2 setup isn't working correctly, and do it the low-level way. After opening a shell and having switched to the root user, do this to install the rpm-python package from Factory:

for 32 bit systems:

rpm -ihv ftp://ftp.belnet.be/mirrors/ftp.opensuse.org/opensuse/distribution/SL-10.1/inst-source/suse/i586/rpm-python-*.rpm
(note that the whole command is supposed to be a single line, just splitted for the sake of readability, but you can still copy/paste that line as-is into your root shell)

for 64 bit systems:

Note that if you have a 64bit system (the command "uname -m" shows "x86_64"), then use the following command instead:
rpm -ihv ftp://ftp.belnet.be/mirrors/ftp.opensuse.org/opensuse/distribution/SL-10.1/inst-source/suse/x86_64/rpm-python-*.rpm

Installing smart

Now that we have rpm-python installed, let's grab smart Go to one of these: (the latter should be the fastest) And pick the URL of the latest smart package for 10.1 and your architecture (i686 or x86_64), e.g. this one for 32bit: http://ftp.skynet.be/pub/suser-guru/rpm/packages/System/smart/smart-0.42-6.guru.suse101.i686.rpm Or this one for 64bit: http://ftp.skynet.be/pub/suser-guru/rpm/packages/System/smart/smart-0.42-6.guru.suse101.x86_64.rpm Pass that to rpm -ivh in a root shell, like this for 32 bit:
rpm -ihv http://ftp.skynet.be/pub/suser-guru/rpm/packages/System/smart/smart-0.42-6.guru.suse101.i686.rpm
or like this for 64bit:
rpm -ihv http://ftp.skynet.be/pub/suser-guru/rpm/packages/System/smart/smart-0.42-6.guru.suse101.x86_64.rpm
From release 0.41-24 and 0.42-1 onwards, my smart RPM comes pre-configured with all the channels you need (main repository, online updates, non-OSS repository, my own "guru" repository, packman, ...), including the correct repository URLs and mirrors for 10.1. Another nice tutorial can be found here, written by sPiN: http://spinink.net/2006/05/20/installing-smart-package-manager/

Post installation

After installing smart, you have to run smart update once to have it download the metadata for the configured repositories. When you run it the first time, it will prompt you on whether you want to include preconfigured channels or not (it asks for every channel). Note that as of version/release 0.41-25 (or 0.42-*) on, the package also includes preconfigured channels for the latest wine, firefox/thunderbird/... updates and the supplementary KDE repository, but those are disabled by default. From there on, if you also want to install the graphical user interface for smart:
smart update
smart install smart-gui
Personally, I prefer the shell interface: smart --shell ;) If you also want to enable e.g. the supplementary KDE repository, do this:
smart channel --enable suse-kde
smart update suse-kde
You get a list of all configured channels with the following command:
smart channel --show

26 Comments:

Anonymous E@zyVG said...

May I ask for your suggestion.

As I always preferred APT+Synaptic for package managent, from SUSE 9.3, would you recommend to continue to use it, or should I totally switch to SMART.

I did write few posts on SMART, and mentioned that this one can be truly an awesome PM, but find it still quite raw ... or am I wrong?

Few words please on this issue.

Tnx

06:59  
Anonymous FunkyPenguin said...

Could you advise on how to add the apt repositories that I have used for some time that are held at ftp://ftp.gwdg.de/pub/linux/suse/apt/SuSE/10.1-i386?

I have apt installed, but would prefer to use SMART.

Many thanks

12:06  
Anonymous for4saken said...

$ smart channel --add [whatever alias you want] type=apt-rpm base-url=ftp://ftp.gwdg.de/pub/linux/suse/apt/SuSE/10.1-i386 components=[whatever you want from the list below]

suser-guru packman packman-i686 rpmkeys base non-oss extra update-drpm update-prpm update kde gnome mozilla samba3 suser-rbos suser-crauch suser-jengelh suser-oc2pus usr-local-bin kolab kernel-of-the-day kraxel wine suse-people suse-projects security-drpm security-prpm security

Best regards,
Marcos

00:17  
Anonymous for4saken said...

Wow, sorry, it's supposed to be:
baseurl=[url]

00:18  
Anonymous Anonymous said...

kopete 0.12 released: http://kopete.kde.org/releases.php

06:21  
Anonymous Anonymous said...

Not used smart before-very impressive. Many thanks for the guide

22:25  
Anonymous Anonymous said...

Great guide - thanks!

03:31  
Anonymous Anonymous said...

hey dudes....just installed smart...very cool indeed. I added ftp.suse.com to my list of channels, called it suse-gnome. When I go into the GUI, I don't see it picking up the 2.14 Pkgs from the channel though. Might it be that one of the other sites configured is overriding it?

thx.
Wendell MacKenzie

19:47  
Anonymous Anonymous said...

@Wendell MacKenzie

Afaik there are no gnome 2.14 packages for suse right now. I'm waiting for them too.

12:17  
Anonymous Anonymous said...

Followed the instructions to the letter nad SMART installed. Tried to install the gui and I get this message

smart install smart-gui
Loading cache...
Updating cache... ######################################## [100%]

Computing transaction... error: Can't install smart-0.42-1.guru.suse101@i686: no package provides python-elementtree

Any idea why or what to do to fix it? I already tried to re-install the python, but the system said it was installed already.

01:09  
Anonymous Anonymous said...

Hey, yeah.. in order to get round the elementtree problem I used the installation CD with yast and installed it (python-elementtree).

As Sherlock Holmes would say, it's elementtree my dear watson.

20:43  
Anonymous IkEcht said...

While trying to rpm the smart-prog itself I get the following error:

error: Failed dependencies:
python-elementtree is needed by smart-0.42-1.guru.suse101.x86_64

and there is no python-elementtree to be found in yast. Any suggestions as to how to solve this?

11:00  
Anonymous Anonymous said...

# yast -i python-elementtree

04:08  
Anonymous Anonymous said...

I installed smart in my suse 10.1 and I wanted to upgrade and I get this message

To enable the keyserver run: "smart config --set keyserver=pgp.mit.edu"

boost-1.33.1-17.pm.2.i586.rpm: public key not available

and then it stops.

19:30  
Anonymous Anonymous said...

thanks for the guide. the package management system that came with SLED was totally broken after a few days.
Smart is OK, but I stiill have a crush on apt-get ;)

21:11  
Anonymous Anonymous said...

Thanks for your great overview and tips on SMART. When I use SMART with SuSE 10 and 10.1 I keep getting caught in a loop over keys. I set the key server to pgp.mit.edu but still get:

The above GPG key has been imported successfully.
It is required to install this package:

libffmpeg0-0.4.9-6.pm.svn20060811.i586.rpm

Do you want to trust this key forever?

You must verify the below fingerprint before answering.
pub 1024D/5277A2FA 1999-07-26 [expires: ????-??-??]
Key fingerprint = 5296 01E5 5911 A1DC 93D4 45D5 8883 66C0 5277 A2FA
uid xxxx
sub 3072g/81D6CA10 1999-07-26


If you answer "Yes" all other packages signed with this key will be installed automatically. (y/N): y

error: libffmpeg0-0.4.9-6.pm.svn20060811.i586.rpm: public key not available
Saving cache...

This stops all installs and kicks me out of the program.

00:42  
Anonymous Anonymous said...

If you are having trouble with signatures and you trust the site, you can bypass rpm signature check. As of 0.42 smart defaults to true and checks rpm signatures. As root:

smart config --set rpm-check-signatures=false

This should work.

16:37  
Blogger mz_dawn said...

This comment has been removed by a blog administrator.

19:17  
Blogger mz_dawn said...

this is what i got when i tried to install with 32 bit:
# rpm -ihv ftp://ftp.belnet.be/mirrors/ftp.opensuse.org/opensuse/distribution/SL-10.1/inst-source/suse/i586/rpm-python-*.rpm
Retrieving ftp://ftp.belnet.be/mirrors/ftp.opensuse.org/opensuse/distribution/SL-10.1/inst-source/suse/i586/rpm-python-4.4.2-40.i586.rpm
error: Failed dependencies:
rpm = 4.4.2 is needed by rpm-python-4.4.2-40
librpm-4.4.so is needed by rpm-python-4.4.2-40
librpmbuild-4.4.so is needed by rpm-python-4.4.2-40
librpmdb-4.4.so is needed by rpm-python-4.4.2-40
librpmio-4.4.so is needed by rpm-python-4.4.2-40

this is what i got with the 64 bit one:

rpm -ihv ftp://ftp.belnet.be/mirrors/ftp.opensuse.org/opensuse/distribution/SL-10.1/inst-source/suse/x86_64/rpm-python-*.rpm
Retrieving ftp://ftp.belnet.be/mirrors/ftp.opensuse.org/opensuse/distribution/SL-10.1/inst-source/suse/x86_64/rpm-python-4.4.2-40.x86_64.rpm
error: Failed dependencies:
rpm = 4.4.2 is needed by rpm-python-4.4.2-40
libbz2.so.1()(64bit) is needed by rpm-python-4.4.2-40
libc.so.6()(64bit) is needed by rpm-python-4.4.2-40
libc.so.6(GLIBC_2.2.5)(64bit) is needed by rpm-python-4.4.2-40
libc.so.6(GLIBC_2.3.4)(64bit) is needed by rpm-python-4.4.2-40
libpopt.so.0()(64bit) is needed by rpm-python-4.4.2-40
libpthread.so.0()(64bit) is needed by rpm-python-4.4.2-40
libpthread.so.0(GLIBC_2.2.5)(64bit) is needed by rpm-python-4.4.2-40
librpm-4.4.so()(64bit) is needed by rpm-python-4.4.2-40
librpmbuild-4.4.so()(64bit) is needed by rpm-python-4.4.2-40
librpmdb-4.4.so()(64bit) is needed by rpm-python-4.4.2-40
librpmio-4.4.so()(64bit) is needed by rpm-python-4.4.2-40
librt.so.1()(64bit) is needed by rpm-python-4.4.2-40
libz.so.1()(64bit) is needed by rpm-python-4.4.2-40
linux:/home/dawn #

i have tried for a month now to get help installing stuff on here and this is what i get......dependencies conflicts....missing files.......blah blah blah, i have left a million forum threads and STILL noone can help mne as to why this is hapening....sigh....any suggestions?

19:17  
Blogger mz_dawn said...

linux:/home/dawn # rpm -ihv ftp://ftp.belnet.be/mirrors/ftp.opensuse.org/opensuse/distribution/SL-10.1/inst-source/suse/i586/rpm-python-*.rpm
Retrieving ftp://ftp.belnet.be/mirrors/ftp.opensuse.org/opensuse/distribution/SL-10.1/inst-source/suse/i586/rpm-python-4.4.2-40.i586.rpm
error: Failed dependencies:
rpm = 4.4.2 is needed by rpm-python-4.4.2-40
librpm-4.4.so is needed by rpm-python-4.4.2-40
librpmbuild-4.4.so is needed by rpm-python-4.4.2-40
librpmdb-4.4.so is needed by rpm-python-4.4.2-40
librpmio-4.4.so is needed by rpm-python-4.4.2-40
linux:/home/dawn #

This is the error i got when i tried to install python using root in terminal...I get errors for EVERYTHING!!! Saying I have missing files....

06:44  
Blogger mz_dawn said...

This comment has been removed by a blog administrator.

06:45  
Anonymous robertc said...

Try using the --nodeps option with RPM, I think you're getting all the errors because installing python-rpm requires a downgrade of your installed packages. If you install it with no dependency checking and then upgrade everything should be fine.

02:16  
Anonymous Anonymous said...

Excellent package and redeems Suse 10.1 from the trash heap. However one small question? How do Iidentify and install any necessary security upgrades. I did a full upgrade and lost all my plugins for firefox. Also do not want to update some applications just to have the latest version.

10:42  
Anonymous Anonymous said...

first of all sorry for my bad english. smart worked fine for me but now something wrong with it. i got this error msg:

Loading cache...
Traceback (most recent call last):##################################### ( 98%)
File "/usr/bin/smart", line 194, in ?
main(sys.argv[1:])
File "/usr/bin/smart", line 167, in main
exitcode = iface.run(opts.command, opts.argv)
File "/usr/lib/python2.4/site-packages/smart/interface.py", line 53, in run
result = _command.main(self._ctrl, opts)
File "/usr/lib/python2.4/site-packages/smart/commands/remove.py", line 68, in main
ctrl.reloadChannels()
File "/usr/lib/python2.4/site-packages/smart/control.py", line 375, in reloadChannels
self._cache.load()
File "/usr/lib/python2.4/site-packages/smart/backends/rpm/metadata.py", line 321, in loadFileProvides
self.parseFilesList(fndict)
File "/usr/lib/python2.4/site-packages/smart/backends/rpm/metadata.py", line 346, in parseFilesList
for event, elem in cElementTree.iterparse(file, ("start", "end")):
File "(string)", line 64, in __iter__
SyntaxError: not well-formed (invalid token): line 479344, column 58

* (string) was with > and < but that site dont allow to post it so i changed it to (string) :)

as i see something wrong with python. am i right? any ideas how can i fix it?

10:07  
Anonymous Anonymous said...

I got the same error as about on several different machines. I've tried removing every rpm and file leftover by smart and it does not fix it. I have since moved back to yum which is slow, but always works.

20:39  
Anonymous Anonymous said...

Found the answer @ linuxquestions, worked for me!

http://www.linuxquestions.org/questions/showthread.php?t=485558

06:55  

Post a Comment

Links to this post:

Create a Link

<< Home