Click to See Complete Forum and Search --> : How to use apt in SuSE: An easy step by step guide


MxCl
11-28-2002, 04:03 PM
APT is wonderful and everyone should at least want to try it. It's been availiable for SuSE for some time (apparently), but I've just found it and got it working too. To feel wonderful type: apt-get upgrade. Aaaaah :)

Anyway the project is called apt4rpm and it's an adaption of APT that works with RPM repositories (like ftp.suse for instance). It mainly works with SuSE currently, (a plus for the excellent European distribution). The homepage is here:

http://linux01.gwdg.de/apt4rpm/

The rpm location is detailed someway down the page. I'll now detail how I got it working.

Install the latest RPM of apt4rpm. Then edit /etc/apt/sources.list, ignore the commented stuff completely and add the rpm line shown in the following text file, however REMOVE BASE! (explained later):

http://ftp.gwdg.de/pub/linux/suse/apt/SuSE/8.0-i386/examples/sources.list.FTP

To explain this file, rpms are split into categories, thus any rpms related to mozilla are contained in the mozilla category. Removing that category from this file will not allow you to update or install Mozilla.

Now save and type (as root):apt-get updateThis will make sure your computer has a current list of rpms and dependencies and that. It is an essential step that should be repeated before you do a session of apt or you end up with an error message that tells you to do it!

Now check apt is working ok:apt-get checkThe biggest problem here is that if you have unmet dependencies or non-suse rpms installed you may well be stuck. I was, but I sussed it by removing some packages and letting apt fix my install for me. Apt is clever and won't let you use it unless all dependencies are met. If things don't go right here, post here (i'm subscribed) or check the project faq.

Now it's ready to go. So upgrade all your software. Trust me, apt is far more fully comprehensive than YOU, also some of those categories in that path are repositories maintained by non-suse people, they contain more up-to-date pacakges (supposedly). You can remove those if you get worried, but frankly I'm not sure how trust worthy they are as yet.apt-get upgrade

After your system is new and snazzy you can install programs easily:apt-get install mpg321Which is like mpg123 but uses mad.

Add base to the sources.list file to upgrade the base install. When I did this apt reported 300MB d/l of rpms, so this isn't fully recommended by the project unless you have broadband. You can also upgrade SuSE 8.0 to 8.1 using apt (something I really want to do soon!) as detailed here:

http://linux01.gwdg.de/apt4rpm/upgrade-80to81

Enjoy! Success stories below if you please :)

adikgede
12-24-2002, 10:32 PM
apt for RHL 6.2 through current is available here: http://apt.freshrpms.net/

Ramin
01-01-2003, 07:36 PM
Sorry i don't quite understand the advantage of APT over YAST2. As far i can see, YAST2 already checks all dependencies. So what does APT do over YAST2? And as far as i'm installing an rpm package, i can do this through YAST2 even if the source is from the internet.

Thanks, Ramin

MB[DK]
01-01-2003, 07:46 PM
Originally posted by Ramin
Sorry i don't quite understand the advantage APT over YAST2. As far i can see, YAST2 already checks all dependencies. So what does APT do over YAST2? And as far as i'm installing an rpm package, i can do this through YAST2 even if the source is from the internet.


Apt works on a number of distros, I cant remember the list but I do remember these:
Red hat 71, 72, 73 and 80
Suse 80, 81

Im sure mandrake, slackware also work

And only Suse has yast2, so in the other distros theres an advantage. And if you ever see how well apt works in Debian, then you will turn green with envy.

One reason I can think of, is if someone was to create rpms that suse doesnt officially support.

Sastraxi
01-02-2003, 02:50 AM
I used to be a huge fan of the Debian way - still am, but I'm getting more into compiling from source. It's nice that other distros are finding apt, though. It's a hell of a tool! Though, sometimes the lists are broken (in my case, python-base was 2.3.21-3 (or something like that), and python-xmlbase was 2.3.21-4, and was expecting -4. This was only in unstable, so I had to go get the correct version and install it before dselect would work again.

schwartz
03-16-2003, 01:34 PM
:confused:

Thank you for your Guide man!!

I did it but in the step "apt-get check" said it:

linuxga:~ # apt-get check
Reading Package Lists... Done
Collecting File Provides... Error!
E: could not open RPM package list file /var/state/apt/lists/ftp.gwdg.de_pub_linux_suse_apt_SuSE_8.1-i386_base_pkglist.wine:
E: Problem opening /var/state/apt/lists/ftp.gwdg.de_pub_linux_suse_apt_SuSE_8.1-i386_base_pkglist.wine
E: The package lists or status file could not be parsed or opened.
linuxga:~ #

Previous saw it in "apt-get update"

Get:58 ftp://ftp.gwdg.de SuSE/8.1-i386/kde3-stable srclist [5979B]
Get:59 ftp://ftp.gwdg.de SuSE/8.1-i386/security-prpm srclist [14B]
Get:60 ftp://ftp.gwdg.de SuSE/8.1-i386/security srclist [14B]
Fetched 2639kB in 14m49s (2968B/s)
Failed to fetch ftp://ftp.gwdg.de/pub/linux/suse/apt/SuSE/8.1-i386/base/pkglist.wine Could not connect data socket, connection timed out
Reading Package Lists... Done
Collecting File Provides... Error!
E: could not open RPM package list file /var/state/apt/lists/ftp.gwdg.de_pub_linux_suse_apt_SuSE_8.1-i386_base_pkglist.wine:
E: Problem opening /var/state/apt/lists/ftp.gwdg.de_pub_linux_suse_apt_SuSE_8.1-i386_base_pkglist.wine
E: The package lists or status file could not be parsed or opened.



I try do "apt-get -f install" but the same problem......


The version of Apt-get is:

schwartz@linuxga:~> rpm -qa | grep -E "^apt-0|^apt-devel-0"
apt-0.5.4cnc9-1cl
apt-devel-0.5.4cnc9-1cl



I actually use Suse 8.1 with kde 3.1,Could anypeople help????

Thank's a Lot!!!!


:)

MxCl
03-16-2003, 06:38 PM
Ramin: Hi, SuSE 8.1 has a better version of YaST that will fetch sources from the Internet (this wasn't the case in version 8.0), so why use APT?

There are several SuSE apt4rpm repositories that include RPMs that are not availiable through YaST Online Update (YOU). Through these I have obtained plenty of packages at more current versions (e.g. Latests version of GIMP and Moz 1.2.1 - could be 1.3 now I haven't checked). Also for instance XFree 4.3 was availiable via apt and I'm fairly certain YaST will not provide this until SuSE 8.2.

Also I upgraded to KDE 3.1 with APT with no hassle. It was a simple:

apt-get dist-upgrade

and then KDE 3.1 was installed. More recently I did this to install XF86 4.3 (although since these packages were experimental the Xfree upgrade wasn't hassle-free, my advice: always read the README!)

Finally I find apt-get upgrade far easier than waiting the age required to use YOU and I also find the GUI for YOU so confusing that the CLI for APT is actually easier to understand!

SCHWATZ: remove wine from your /etc/apt/sources.list. That should fix the problem although you won't be able to install wine. I dunno why you're getting this error message though..

MxCl
03-16-2003, 06:40 PM
:) I just did an apt-get upgrade having been away all weekend and usr-local-bin have uploaded mozilla 1.3 to the repositary (compiled for xft/freetype too).

APT is well worth it.

schwartz
03-16-2003, 07:48 PM
:cool:

Thank's a lot for your fast answer.!!

Solved it,but synaptic said:

schwartz@linuxga:~> su -
Password:
linuxga:~ # cd ..
linuxga:/ # cd usr/sbin
linuxga:/usr/sbin # synaptic

Gtk-WARNING **: cannot open display:
linuxga:/usr/sbin #

What is my wrong??

Thank!

MxCl
03-17-2003, 04:48 AM
Use sux rather than su.

schwartz
03-17-2003, 07:14 PM
Thank you!