How Do I Deal With Package Dependencies?

Asked by Brad Isbell

I installed Ubuntu 7.10 last week and decided to learn how to compile programs. So, I went out to sourceforge and downloaded something- stellarium. It doesn't really matter what it is, I just want to practice the process.
So, during the installation it complained about not having qmake. I tried using apt-get to get the qt4 library with no success. I also tried using synaptic, but libqt4 wasn't listed.
So I found the package located at http://packages.ubuntu.com/gutsy/libs/libqt4-core. Seems easy enough- configure, make, make install - right?
Didn't work.
On the libqt4 page it shows that there are several dependencies, and then each of these packages have dependencies for them as well.
Is there an easy way to get around all this? Am I expected to spend hours and hours downloading library packages and their dependencies and their dependencies dependencies every time I want to go to sourceforge and download something?
Why are the packages available from packages.ubuntu.com but they don't download with apt-get or synaptic?
Is this was being a Linux user is all about?

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:

This question was reopened

Revision history for this message
Shannon Fang (xrfang) said :
#1

Hello,

libqt4 is available through synaptic, why not just use it to install? It should automatically download and install all dependencies.

Also, my experience is you should install build-essential:

sudo apt-get install build-essential

If you have not yet done so.

As for the detailed requirement of compiling a particular software you need to read the README for it.

You mentioned about "Is this was being a Linux user is all about". I don't think so. Do you enjoy compiling software? If not, I strongly suggest you do NOT do so, simply use binary packages available in the repo... I am such a happy Ubuntu user.

Good Luck!
Shannon

Revision history for this message
Brad Isbell (bradley-isbell) said :
#2

In synaptic the package list goes:
libpurple
libqthreads-12
librarian0

With apt-get I get the following:
$ sudo apt-get install libqt4
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Couldn't find package libqt4

I installed build-essentials last night based on another thread thread that I read through.

I'd love to only use binary packages, but sometimes binary packages aren't available. In those cases I'd like to know how to compile things.

Revision history for this message
Ralph Janke (txwikinger) said :
#3

Thanks for the question

I am not sure if I understand your question correctly.

If you want to install the binaries of the package, you use "sudo apt-get install <packagename>" or you can use a package manager. The name of the package is "libqt4-core".

if you want to download the sources of a package in order to try to compile them, you use "apt-get source <packagename>". It will automatically download and unpack the sources into the current folder.

If you look inside the sources, you will find a file called "control" inside the "debian" folder. The line starting with "Build-Depends:" will give you all the package that need to be installed on your system in order to be able to compile the package.

Hope this answers your question.

Revision history for this message
Brad Isbell (bradley-isbell) said :
#4

I'm really not an idiot, although I'm starting to feel like one.
I've tried many variations, nothing works:

$ sudo apt-get install libqt4-core
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Couldn't find package libqt4-core

I know apt-get works, because if I find a package in synaptic that's not installed I can install it with apt-get.
Here's an example:

/$ sudo apt-get install aide
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  aide-common exim4 exim4-base exim4-config exim4-daemon-light liblockfile1 mailx
Suggested packages:
  eximon4 exim4-doc-html exim4-doc-info libmail-spf-query-perl
The following NEW packages will be installed:
  aide aide-common exim4 exim4-base exim4-config exim4-daemon-light liblockfile1 mailx
0 upgraded, 8 newly installed, 0 to remove and 0 not upgraded.
Need to get 0B/2374kB of archives.
After unpacking 5595kB of additional disk space will be used.
Do you want to continue [Y/n]?

Revision history for this message
Brad Isbell (bradley-isbell) said :
#5

I'm really not an idiot, although I'm starting to feel like one.
I've tried many variations, nothing works:

$ sudo apt-get install libqt4-core
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Couldn't find package libqt4-core

I know apt-get works, because if I find a package in synaptic that's not installed I can install it with apt-get.
Here's an example:

/$ sudo apt-get install aide
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  aide-common exim4 exim4-base exim4-config exim4-daemon-light liblockfile1 mailx
Suggested packages:
  eximon4 exim4-doc-html exim4-doc-info libmail-spf-query-perl
The following NEW packages will be installed:
  aide aide-common exim4 exim4-base exim4-config exim4-daemon-light liblockfile1 mailx
0 upgraded, 8 newly installed, 0 to remove and 0 not upgraded.
Need to get 0B/2374kB of archives.
After unpacking 5595kB of additional disk space will be used.
Do you want to continue [Y/n]?

Revision history for this message
Shannon Fang (xrfang) said :
#6

I indeed have libqt4-core in my repos.

Please check your software source, you may need to include universe and multiverse etc., and then update the repos.

Can you help with this problem?

Provide an answer of your own, or ask Brad Isbell for more information if necessary.

To post a message you must log in.