|
Title: HowTo: Install and Configure apt Description: Advanced Package Tool APT is an extremely useful command-line tool for downloading and installing programs that are not included on your SuSE installation discs. The following tutorial explains how to install apt and get it configured. I will follow-up this tutorial by explaining how to install and configure Synaptic, which is a very nice GUI for apt.
Getting APT
You will need to download three files to get apt installed and running on your computer. If you are using SuSE 9.1, you can simply click on the links listed below to download those files. They should open up in Konqueror. You can then click the button at the top that says "Install Package With YaST", and it will install each package. If you have not performed any online updates, you might not be able to install apt-lib or apt. They require a lib file that was accidentally omitted from the original SuSE 9.1 installation package. It is called popt, and will be referred to as something like "A C Library for parsing commandline parameters". [PaulSteph added that] For 9.1 users, as stated in the How-To, an online update must be done to find the missing popt file. The update needed is the - C Library for Parsing update. Do the update before downloading the three files and everything goes along swimmingly. If you are using a different version of SuSE, then you should go to ftp://ftp.gwdg.de/pub/linux/suse/apt/SuSE/ and choose your distribution/version, then navigate to the RPMS.suser-rbos directory to locate the appropriate packages. It appears as though lua is not in that directory, however, so, if it is not already installed, you should go to ftp://ftp.suse.com/pub/suse/[arch1]/[v]/suse/[arch2]/ and locate it there. [arch1] should be replaced by either i386 or x86_64, [v] should be replaced by your version number, and [arch2] should be replaced by your architecture (most likely either i586 or x86_64).
Installing APT
To install your RPM's, you will want to install them in the order in which I listed them. You should be able to simply right-click on the RPM package, and choose to "Install with YaST". Once you get the third package installed, you will need to edit your sources.list file. In order to edit the file, you will need to have root user permissions. In SuSE, you should simply be able to choose "File Manager - Super User Mode" from the main menu. You will then be prompted for a password. Be sure to enter the root password, not your user password. A file manager will then open, and be completely blank. You will want to navigate to /etc/apt/ and then open sources.list in a text editor (for any Linux build using a KDE desktop, you will most likely have Kate and KWrite as choices). There will probably be quite a bit of information in that file, and it will most likely be all commented out (each line will begin with a # symbol). You will want to find the line that looks similar to: rpm ftp://ftp.gwdg.de/pub/linux/suse/apt SuSE/9.1-i386 update security base suser-rbos and remove the "#" symbol from the beginning of that line. For other builds of Linux, that line will probably look very similar, but it will most likely contain a slightly different ftp address, and will definitely contain a different package name (where this one says "SuSE/9.1-i386").
Configuring and Using APT
You will now want to open up a terminal window as the root user. In SuSE, you can simply choose "Terminal Window - Super User" from the main menu. The first line of the terminal window will want you to enter your password. Be sure to enter the root password. Then, type: apt-get update To use apt to install packages, most of the time you will simply need to type: apt-get install [packagename] If, for instance, you want to install GCC, you would simply type: apt-get install gcc
Adding New Repositories
In order to add new repositories, you will need to open your /etc/apt/sources.list file. There are two ways to add package sources to apt. First, you can simply add users to an existing repository. For instance, if you would like to use packman's packages, you can simply add the word "packman" to your existing repository. So, your repository would look like: rpm ftp://ftp.gwdg.de/pub/linux/suse/apt SuSE/9.1-i386 update security base suser-rbos packman packman is an existing user on that particular repository, so all of his packages will become available when you add him as a user. If you still have trouble finding what you want, or if the repository you are using is simply too slow, then you can add an entirely new repository. Be aware, though, that any repository you add will have to be set up for apt. There are certain information files that have to be located on the server in order to use it with apt. You can't just add any URL to your list and expect it to work. In order to add a new repository to your list, you will need to open your sources.list file. Locate the existing repositories, and start a new line. You will now need to add the word "rpm" at the beginning of the line. This tells apt that you are going to be downloading rpm packages from that address. Next, you will want to add the URL for the repository. This will generally end with /apt/. Then, you will need to add the directory in which apt should search for packages. This directory generally consists of your distribution, version, and architecture in some way. An example from the apt handbook (linked below) would look something like this, if you were adding it as a repository for SuSE 9.1 on an x86 computer: ftp://ftp.uni-erlangen.de/pub/Linux/MIRROR.suse/apt SuSE/9.1-i386 update security That would set that repository up to download packages from the "update" and "security" users. To get a list of the users available, you should go to the full address for your distribution (in this case, that would be ftp://ftp.uni-erlangen.de/pub/Linux/MIRRO.../SuSE/9.1-i386/ ) and look at the list that shows up. Everything that begins with RPMS. is a user that you can add to that repository. The text that follows "RPMS." is the name of the user. So, for instance, the first user that shows up at that address is atidriver.
And for x86_64 users
Download the following for APT4RPM: in ~/apt4rpm apt-0.5.15cnc6-rb5.x86_64.rpm apt-libs-0.5.15cnc6-rb5.x86_64.rpm (do not use the apt-*cnc7*.rpm files, as you will encounter dependencies trouble) Now to installing APT4RPM (remember, I am using 9.2 64bit version) cd ~/apt4rpm yast -i apt* Edited source list, to have one apt repository specified there, for the time being (then will modify according to needs) (best for 1st run) rpm ftp://ftp.gwdg.de/pub/linux/suse/apt/ SuSE/9.2-x86_64 packman base update-drpm update-prpm update security rpmkeys suser-jmorris security-prpmsuser-jmorris security-prpm (you add this, or edit this, in source.list, which is located at /etc/apt/) Next to updating Apt apt-get update Now to installing Synaptic GUI for Apt apt-get -install synaptic (installed through apt-get, as installing manually was giving lil probs with dependencies. No probs with this option) Sources: My own unfinished tutorial on setting up a web server on your Linux box The APT4RPM site for SuSE Credits: E@zyVG (x86_64 part) BlackAura, the resident Linux Expert at www.dcemulation.com∞ To add your own howto: HowTos Comments or Suggestions: forums.suselinuxsupport.de∞ i am an elastic firecracker |
Warning: include(http://forums.suselinuxsupport.de/ssi.php?a=active) [function.include]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
in /home/customers/webs/slwiki/actions/footer.php on line 51
Warning: include() [function.include]: Failed opening 'http://forums.suselinuxsupport.de/ssi.php?a=active' for inclusion (include_path='.:/home/customers/webs') in /home/customers/webs/slwiki/actions/footer.php on line 51
There are no comments on this page. [Add comment]