PDA

View Full Version : how do you make apt work like it's supposed to?



three eyes open
07-31-2003, 01:50 AM
According to the tutorial I read at the Debian site what I'm doing should work but it's not.

According to the instructions, first apt-get update, which I've done.

Then you should be able to install the package you want with apt-cache search <packagename> and then apt-get install <packagename>. When I do this I get the error message dependencies not met. Same thing with apt-cdrom, using the Debian Woody cds.

The turorials all say APT downloads the dependencies and installs them for you. That's not what's happening.

When I look at the new packages list using Kpackage and I try to install it I get "no such file or directory". Huh? It found it when I apt-updated but it can't when I want to install it?

How do I make this work?

Stephen
07-31-2003, 02:29 AM
The woody CD's are really no good to you Knoppix installed (Debian) on the HD is a mix of testing/unstable with some sources thrown in from non-offical Debian sites therefore you are trying to install a program from stable and you already have later versions of the needed dependencies so it will not install the program.

You should also be using apt-cache policy packagename this will tell you the installed or to be installed package and where it will come from eg testing or unstable in the odd case maybe even stable. So to install a package you would most likely be using the command apt-get -s install packagename/unstable this would simulate the install of the package from the unstable branch if there are no problems then remove the -s and proceed if there are dependencies needed it will tell you what version is required and what would be installed but is not of a high enough version so run the apt-cache policy on that and then simulate the install of it from the branch required if everything goes fine then install then re-try the original program you were installing if necessary repeat until there are no unsatisfied dependencies and the program will install.

As to Kpackage never use it so I can not tell you anything about it. There is another graphic front end for apt called synaptic that you can install I used it a couple of times but I prefer the control you get with apt-get you can try that if you want, it may work better than kpackage for you.

three eyes open
07-31-2003, 05:13 AM
Thank you again, Stephen, you've been very helpful! :D

three eyes open
08-01-2003, 12:46 AM
Ok, now what command do I need to use to tell it to install a package and it's dependencies?

I looked at the tutorial at debian.org and it said "we won't cover that here". :evil:

Sorry to bug you again.

garyng
08-01-2003, 02:56 AM
there is a bug in kpackage that the KDE guys doing bother to fix(for at least 6 months ths reporting by different people). You cannot be root when you want to use kpackage but only ordinary user. Beside, the root must have password as kpackage would do a 'su' to do the real work.

I use kpackage to browse package available and use apt-get for actual installation.

it is just :

apt-get install <package name you see in kpackage>

the dependency will be handled automatically. However, apt-get's logic(or could be that the maintainers logic) only allows easy 'upgrade' and not as good as it sounds in the tutorial that you can upgrade/downgrade anyway you want. There is quite some restricitions once you moved up, not easy to come back down to the old version.

Stephen
08-01-2003, 03:02 AM
Well apt-get install package_name will in theory do this but as you have discovered this sometimes is not the case. So when you get the screen telling you that such and such a package cannot be installed because it needs dependency-1.2.3 but dependency-1.2.2 is going to be installed this is where apt-cache policy dependency would be used to see where you have to install the dependency package from. An example of what this looks like:


HappyTux:/home/stephen# apt-cache policy konqueror
konqueror:
Installed: 4:3.1.2-1.1
Candidate: 4:3.1.2-1.1
Version Table:
*** 4:3.1.2-1.1 0
500 http://ftp.de.debian.org unstable/main Packages
100 /var/lib/dpkg/status
4:2.2.2-14.4 0
500 http://security.debian.org stable/updates/main Packages
4:2.2.2-14 0
500 http://ftp.de.debian.org stable/main Packages
990 http://ftp.de.debian.org testing/main Packages


With this example it shows that konqueror is already at it highest version possible but lets say I needed to get 3.1.2-1.1 to satisfy a dependency and it was at version 2.2.2-14.4 and that version is what will be installed you can see this in the candidate section:



HappyTux:/home/stephen# apt-cache policy konqueror
konqueror:
Installed: 4:2.2.2-14.4 0
Candidate: 4:2.2.2-14.4 0
Version Table:
*** 4:2.2.2-14.4 0
500 http://security.debian.org stable/updates/main Packages
100 /var/lib/dpkg/status
4:3.1.2-1.1
500 http://ftp.de.debian.org unstable/main Packages
4:2.2.2-14 0
500 http://ftp.de.debian.org stable/main Packages
990 http://ftp.de.debian.org testing/main Packages



Then to install the version 3.1.2-1.1 from unstable to satisfy the dependency I would apt-get install konqueror/unstable then I would proceed to install the original program now that the dependency is satisfied. Now if there are other dependencies to install you would repeat this process until the dependencies for the program you want to install are all installed then you would install it, if the case comes up where you need to install two dependencies but one will not install without the other being at the newer version also then you would apt-get install dependency_1/unstable dependency_2/unstable to install them both at the same time this assumes they would both be coming from the unstable branch which would most likely be the case.

I think this about as clear as I can make it without being at the computer to show you how to do it, hope this helps.

three eyes open
08-01-2003, 07:29 AM
Thanks again! You really are about the most helpful Linux person I've encountered yet! :D