Dependency Issue Question

New to Debian (Or Linux in general)? Ask your questions here!

Dependency Issue Question

Postby fatman » 2009-12-12 01:46

Hi everyone,

I've decided today to install opensips and play around with it. I've got debian lenny installed

Code: Select all
voip:~# uname -a
Linux voip 2.6.26-2-686 #1 SMP Wed Nov 4 20:45:37 UTC 2009 i686 GNU/Linux


and I will follow the article listed below:

http://vidodz.wordpress.com/2009/07/28/ ... or-ubuntu/

I'm already stuck at the first part:

1. sudo apt-get install bison bison++ bisonc++
2. sudo apt-get install flex
3. sudo apt-get install libsctp1
4. sudo apt-get install mysql-server
5. sudo apt-get install libmysqlclient-dev
6. sudo apt-get install libxml2-dev
7. sudo apt-get install libexpat1-dev
8. sudo apt-get install libradius-ng2 libradius-ng-dev
9. sudo apt-get install libcurl3-dev
10. sudo apt-get install libxmlrpc-c3 libxmlrpc-c3-dev
11. sudo apt-get install libperl-dev
12. sudo apt-get install libsnmp-dev
13. sudo apt-get install libconfuse0 libconfuse-dev
14. sudo apt-get install build-essential


When I run aptitude install flex, I run into dependency issues.

Reading task descriptions... Done
The following packages are BROKEN:
flex-old
The following NEW packages will be installed:
flex m4{a}
0 packages upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 531kB of archives. After unpacking 1343kB will be used.
The following packages have unmet dependencies:
flex-old: Conflicts: flex but 2.5.35-6 is to be installed.
The following actions will resolve these dependencies:

Remove the following packages:
flex-old

Leave the following dependencies unresolved:
bison++ recommends flex-old
Score is -439

Accept this solution? [Y/n/q/?] y


I will continue and attempt the installation but I was wondering if someone could provide me some guidance. Am I making a mistake by continuing?

Should I be followowing this article or switch to the one listed on opensips?

http://www.opensips.org/Resources/Install

Thanks in advance,

Fatman
Last edited by fatman on 2009-12-12 02:43, edited 1 time in total.
fatman
 
Posts: 13
Joined: 2009-12-12 01:24

Re: Fatman's Attempt To Install OpenSips

Postby fatman » 2009-12-12 02:42

I have a follow up question for any body out there reading...

What is the best way to deal with dependency issues? I'm trying to figure out what I should do next.. From what I've read and understood (correct me if I'm wrong), flex-old is required by bison++ and the installation of flex is attempting to install a version that later.

Does this automatically mean that flex 2.5.35-6 is not backwards compatible and will break the bison++ package?

Code: Select all
voip:~# dpkg -s bison++
Package: bison++
Status: install ok installed
Priority: optional
Section: devel
Installed-Size: 612
Maintainer: Jose Luis Tallon <jltallon@adv-solutions.net>
Architecture: i386
Version: 1.21.11-3
Depends: libc6 (>= 2.3.6-6), libgcc1 (>= 1:4.1.0), libstdc++6 (>= 4.1.0)
Recommends: flex-old, c-compiler
Conflicts: bison, bison-doc
Description: Generate a parser in c or c++ from BNF notation
 Based on bison version 1.19. Compatible with bison but with C++ support.
 Bison is a general-purpose parser generator that converts a grammar
 description for an LALR (BNF-like) context free grammar into a C/C++ program
 to parse that grammar. Once you are proficient with bison++ you can generate
 a wide range of language parsers, from those used in simple desk calculators
 to complex programming languages.


When I attempt to gather information about flex-old, it seems like it's not installed.

Code: Select all
voip:~# dpkg -s flex-old
Package: flex-old
Status: purge ok not-installed
Priority: extra
Section: devel


What do most people do to resolve dependency issues?
fatman
 
Posts: 13
Joined: 2009-12-12 01:24

Re: Dependency Issue Question

Postby bluesdog » 2009-12-12 18:44

It depends....

... on the situation.

In this particular case,
bison++ recommends flex-old
the dependency is to a recommended package, rather than a required one, so you were correct in continuing

Occasionally you'll encounter a dependency issue involving required packages, and the resolution may be more difficult or downright impossible.

Sometimes the package's control script has an error regarding a dependency. For example, I recently attempted installing miro on a friend's computer. Unfortunately the current miro package for amd, miro_2.5.3-1_amd64.deb, depends on xulrunner-1.9, which does not exist, but xulrunner-1.9.1 does.
Downloading the deb and editing the control file by changing the depends line to reference the correct dependency enables install

This kind of procedure is not something normally expected of a new user... :shock:

Sometimes a pre-install script will balk at an impossible situation. Major upgrades sometimes encounter this, but can usually be fixed by careful examination of the error message resulting from the failed dpkg, and making appropriate edits to the script, or to the environment.
Tips & Tricks

Something more to read while waiting

If you obviously have not read THIS, don't expect too much...




*winter bluesdog....*
User avatar
bluesdog
 
Posts: 2082
Joined: 2006-02-01 09:02
Location: Similkameen, British Columbia, Canada

Re: Dependency Issue Question

Postby fatman » 2009-12-12 20:14

Thanks for the info..

I've stumbled accross another issue and was hoping you could give me some advice. When I attempt to install libmysqlclient-dev, i get the following output:

Code: Select all
voip:~# aptitude install libmysqlclient-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
Reading task descriptions... Done
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0B of archives. After unpacking 0B will be used.
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
Reading task descriptions... Done


I assume this is because the package is not available due to the source not being specified in the /etc/apt/source-list... So when i run aptitude install [...], aptitude does not know where to find the package. This brings me to my following question:
What is the best way to search for required dependencies (e.g. libmysqlclient-dev) to know what line needs to be added to /etc/apt/source-list to proceed with its installation?

Thanks again for your help...
fatman
 
Posts: 13
Joined: 2009-12-12 01:24

Re: Dependency Issue Question

Postby fatman » 2009-12-12 21:56

Searching around the NET, I noticed a couple of sites mentioning to add the following so that i can download libmysqlclient-dev:

Code: Select all
deb http://packages.dotdeb.org stable all
deb-src http://packages.dotdeb.org stable all


When I run aptitude update it mentions that I should update 2 packages. However I'm worried about the message that poped up about an untrusted version being installed.

Code: Select all
Ign http://packages.dotdeb.org stable Release.gpg
Ign http://packages.dotdeb.org stable/all Translation-en_CA
Ign http://packages.dotdeb.org stable Release
Ign http://security.debian.org lenny/updates/main Packages/DiffIndex
Ign http://security.debian.org lenny/updates/main Sources/DiffIndex
Get:5 http://packages.dotdeb.org stable/all Packages [11.9kB]
Get:6 http://security.debian.org lenny/updates/main Packages [314kB]
Ign http://volatile.debian.org lenny/volatile/main Packages/DiffIndex
Ign http://volatile.debian.org lenny/volatile/main Sources/DiffIndex
Get:7 http://packages.dotdeb.org stable/all Sources [4366B]
Get:8 http://volatile.debian.org lenny/volatile/main Packages [7538B]
Get:9 http://volatile.debian.org lenny/volatile/main Sources [2239B]
Get:10 http://security.debian.org lenny/updates/main Sources [78.5kB]
Fetched 501kB in 7s (62.7kB/s)
Reading package lists... Done

Current status: 2 updates [+2], 29 new [+29].
mrvoip:~# aptitude upgrade
W: The "upgrade" command is deprecated; use "safe-upgrade" instead.
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
Reading task descriptions... Done
Resolving dependencies...
Resolving dependencies...
Resolving dependencies...
Resolving dependencies...
Resolving dependencies...
Resolving dependencies...
The following NEW packages will be installed:
  libmysqlclient16{a} mysql-client-5.1{a} mysql-server-5.1{a}
The following packages will be REMOVED:
  libterm-readkey-perl{u} mysql-client-5.0{u} mysql-server-5.0{u}
The following packages will be upgraded:
  mysql-common mysql-server
2 packages upgraded, 3 newly installed, 3 to remove and 0 not upgraded.
Need to get 22.0MB of archives. After unpacking 51.8MB will be freed.
Do you want to continue? [Y/n/?] y
WARNING: untrusted versions of the following packages will be installed!

Untrusted packages could compromise your system's security.
You should only proceed with the installation if you are certain that
this is what you want to do.

  mysql-server-5.1 mysql-client-5.1 mysql-common mysql-server libmysqlclient16

Do you want to ignore this warning and proceed anyway?
To continue, enter "Yes"; to abort, enter "No": no


How do I go about getting libmysqlclient-dev? Is it safe to add the two line mentioned earlier and proceed with the upgrade?

Well... since this is a test machine to play around with. I will proceed with the upgrade.
fatman
 
Posts: 13
Joined: 2009-12-12 01:24

Re: Dependency Issue Question

Postby bluesdog » 2009-12-12 22:38

You're running Lenny, right?

Consider adding the Debian backports repository to your /etc/apt/sources.list

Instructions here: http://backports.org/dokuwiki/doku.php?id=instructions

Also, check the status of debian-archive-keyring
Code: Select all
apt-cache policy debian-archive-keyring


Try to stay with the Debian official repositories. It's generally safer.

Post your /etc/apt/sources.list anyway, so we may check it out...
Tips & Tricks

Something more to read while waiting

If you obviously have not read THIS, don't expect too much...




*winter bluesdog....*
User avatar
bluesdog
 
Posts: 2082
Joined: 2006-02-01 09:02
Location: Similkameen, British Columbia, Canada

Re: Dependency Issue Question

Postby fatman » 2009-12-12 22:50

Thanks bluesdog, I was a little impatient and proceed with the install. :(

Do you recomend that I purge the following packages that I just installed and then make the modifications to my /etc/apt/source.list according to the link you provided?

Code: Select all
#aptitude purge mysql-server-5.1 mysql-client-5.1 mysql-common mysql-server libmysqlclient16


Here's my source.list

#
# deb cdrom:[Debian GNU/Linux 5.0.3 _Lenny_ - Official i386 NETINST Binary-1 20090906-12:06]/ lenny main

#deb cdrom:[Debian GNU/Linux 5.0.3 _Lenny_ - Official i386 NETINST Binary-1 20090906-12:06]/ lenny main

deb http://packages.dotdeb.org stable all
deb-src http://packages.dotdeb.org stable all

deb http://ftp3.nrc.ca/debian/ lenny main
deb-src http://ftp3.nrc.ca/debian/ lenny main

deb http://security.debian.org/ lenny/updates main
deb-src http://security.debian.org/ lenny/updates main

deb http://volatile.debian.org/debian-volatile lenny/volatile main
deb-src http://volatile.debian.org/debian-volatile lenny/volatile main
fatman
 
Posts: 13
Joined: 2009-12-12 01:24

Re: Dependency Issue Question

Postby bluesdog » 2009-12-12 22:56

Nah. dotdeb looks pretty legit.

If the packages installed ok, and if everything still works, leave it as it is.

You might want to add backports anyway
Tips & Tricks

Something more to read while waiting

If you obviously have not read THIS, don't expect too much...




*winter bluesdog....*
User avatar
bluesdog
 
Posts: 2082
Joined: 2006-02-01 09:02
Location: Similkameen, British Columbia, Canada

Re: Dependency Issue Question

Postby fatman » 2009-12-12 23:17

Thanks again for the info. Should I add the following to /etc/apt/preferences so that I get all my packages from backports:

Code: Select all
Package: *
Pin: release a=lenny-backports
Pin-Priority: 200


This just for others, when I added backports to my source-list I ran into the problem listed below:

Code: Select all
Ign http://www.backports.org lenny-backports Release
Get:4 http://packages.dotdeb.org stable/all Sources [4366B]
Get:5 http://www.backports.org lenny-backports/main Packages [372kB]
Get:6 http://www.backports.org lenny-backports/contrib Packages [885B]
Get:7 http://www.backports.org lenny-backports/non-free Packages [3208B]
Fetched 449kB in 8s (52.8kB/s)
Reading package lists... Done
W: GPG error: http://www.backports.org lenny-backports Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY EA8E8B2116BA136C
W: You may want to run apt-get update to correct these problems

Current status: 474 new [+445].


This was fixed by running

Code: Select all
voip:~# apt-get install debian-backports-keyring
voip:~# apt-get update
voip:~# aptitude update --> not sure if necessary


I'm still unable to get the libxml2-dev through backport. Which brings me back to the questions I asked before... What is the best way to find or search for libraries?

I see here that I can download the source from:
http://packages.debian.org/squeeze/libxml2-dev

but i would prefer using aptitude.

Code: Select all
voip:~# apt-cache policy debian-archive-keyring
debian-archive-keyring:
  Installed: 2009.01.31
  Candidate: 2009.01.31
  Version table:
 *** 2009.01.31 0
        500 http://ftp3.nrc.ca lenny/main Packages
        100 /var/lib/dpkg/status


Thanks again,

Fatman
fatman
 
Posts: 13
Joined: 2009-12-12 01:24

Re: Dependency Issue Question

Postby bluesdog » 2009-12-13 02:45

Code: Select all
$ apt-cache policy libxml2-dev
libxml2-dev:
  Installed: 2.7.6.dfsg-1
  Candidate: 2.7.6.dfsg-1
  Version table:
 *** 2.7.6.dfsg-1 0
        500 http://ftp.uk.debian.org squeeze/main Packages
        500 http://ftp.uk.debian.org sid/main Packages
        100 /var/lib/dpkg/status
     2.6.32.dfsg-5+lenny1 0
        500 http://ftp.uk.debian.org lenny/main Packages


As you see, libxml2-dev v. 2.6.32 is, or should be, available from lenny/main. If it does not appear after aptitude update, and apt-cache policy doesn't locate it, you might want to try a different Debian repository in your /etc/apt/sources.list. Make sure you do not have redundant repos in the file.

~~~

The command, aptitude update is pretty much the same as apt-get update. There was a time when it wasn't, exactly.
The preferred method is to use aptitude whenever possible.
Tips & Tricks

Something more to read while waiting

If you obviously have not read THIS, don't expect too much...




*winter bluesdog....*
User avatar
bluesdog
 
Posts: 2082
Joined: 2006-02-01 09:02
Location: Similkameen, British Columbia, Canada

Re: Dependency Issue Question

Postby fatman » 2009-12-13 15:17

I feel really stupid asking you this however searching the web and this forum has not yielded an answer. I'm still having problems finding packages in the repositories. How do I go about searching for libradius-ng2 package? I know that i'm missing a repository but how to I know which one I require for this non standards package?

Code: Select all
voip:~# apt-cache search libradius-ng2

voip:~# apt-cache policy libradius-ng2
W: Unable to locate package libradius-ng2

I also tried searching online:
http://backports.org/dokuwiki/doku.php?id=packages
http://packages.debian.org/search?keywords=libradius-ng2&searchon=names&suite=stable&section=all


I went ahead and changed my source.list to the following:

Code: Select all
deb http://ftp.us.debian.org/debian/ lenny main contrib non-free
deb-src http://ftp.us.debian.org/debian/ lenny main contrib non-free

deb http://www.backports.org/debian lenny-backports main contrib non-free

deb http://security.debian.org/ lenny/updates main
deb-src http://security.debian.org/ lenny/updates main

deb http://volatile.debian.org/debian-volatile lenny/volatile main
deb-src http://volatile.debian.org/debian-volatile lenny/volatile main

Thanks again for all your help bluesdog.
fatman
 
Posts: 13
Joined: 2009-12-12 01:24

Re: Dependency Issue Question

Postby nadir » 2009-12-13 15:49

on sid:
Code: Select all
root@desktop-sid# apt-cache search libradius-ng2
root@desktop-sid

but:
Code: Select all
root@desktop-sid# apt-cache search libradius
libradiusclient-ng-dev - Enhanced RADIUS client library development files
libradiusclient-ng2 - Enhanced RADIUS client library
libradius1-dev - /bin/login replacement with RADIUS. Header file and link lib
libradius1 - /bin/login replacement with RADIUS. Shared lib to used by programs


on lenny it seems to be similar:
http://packages.debian.org/search?suite ... client-ng2

perhaps.
"I am not fine with it, so there is nothing for me to do but stand aside." M.D.
User avatar
nadir
 
Posts: 5964
Joined: 2009-10-05 22:06
Location: away

Re: Dependency Issue Question

Postby fatman » 2009-12-13 16:08

Thanks nadir,

I actually found it just before returning to the forum by typing aptitude and searching the packages using the curses base interface. It never really clicked that the article I've been following was most likely not done with debian. :oops:

I will now proceed with the installation of

Code: Select all
libradiusclient-ng-dev - Enhanced RADIUS client library development files
libradiusclient-ng2 - Enhanced RADIUS client library


I feel like a real moron for not RTFM... I think you could classify me in the newbi category listed below however i'm working on putting that behind me! :wink:

From bluesdog
A quick browse of the forum will illustrate what I mean: Some beginners who are very new to Debian, or Linux in general, seem intent on trying the most bizarre 'installation' procedures, with the excuse they are doing so as a learning experience or something.
fatman
 
Posts: 13
Joined: 2009-12-12 01:24

Re: Dependency Issue Question

Postby fatman » 2009-12-13 17:06

We'll I'm making good progress and I now have all the dependencies required for the install. When I went over to the opensips website, I noticed that you can install the package via repository.

http://www.opensips.org/Resources/Downloads

3. Packages
Thanks to several maintainers, OpenSIPS packages for certain Operating System/Distributions are available for download also:

OpenSUSE (RPMs) (thanks to Peter Nixon)
http://download.opensuse.org/repositori ... telephony/
CentOS el5 (RPMs i386/x86_64) (thanks to Julian Yap & Marc Leurent)
http://centos.leurent.eu/
Debian repository sid(unsable), etch(4.0) and lenny (5.0) (APT i386)
http://www.opensips.org/apt/
Debian repository lenny (APT i386/amd64)
http://debian.leurent.eu/


I decided to go with the last option which requires these steps:
http://debian.leurent.eu/README.txt

Code: Select all
To use the debian lenny repository, simply add this in your /etc/apt/sources.list

 # debian.leurent.eu
 deb http://debian.leurent.eu/debian lenny main
 deb-src http://debian.leurent.eu/debian/ lenny main

Then reload the package cache
 aptitude update

Then install the leurent.eu gpg key
 aptitude install -y leurent-archive-keyring
 aptitude update

Then install opensips
 aptitude install opensips opensips-snmpstats-module opensips-mysql-module


When attempt the above, i get prompted with this message:

Code: Select all
WARNING: untrusted versions of the following packages will be installed!

Untrusted packages could compromise your system's security.
You should only proceed with the installation if you are certain that
this is what you want to do.

  leurent-archive-keyring

Do you want to ignore this warning and proceed anyway?
To continue, enter "Yes"; to abort, enter "No": Yes
Writing extended state information... Done
Get:1 http://debian.leurent.eu lenny/main leurent-archive-keyring 1.0 [3102B]
Fetched 3104B in 0s (5996B/s)
E: Failed to fetch http://debian.leurent.eu/debian/pool/main/leurent-archive-keyring_1.0_all.deb: Size mismatch
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
Reading task descriptions... Done


I'm a little hesitant to proceed with the force option in apt-get so I will see if the other repository options give me the same problem. I also just noticed a posting about using apt-get with the following options:

check
check is a diagnostic tool; it updates the package cache and checks
for broken dependencies.

clean
clean clears out the local repository of retrieved package files.
It removes everything but the lock file from
/var/cache/apt/archives/ and /var/cache/apt/archives/partial/. When
APT is used as a dselect(8) method, clean is run automatically.
Those who do not use dselect will likely want to run apt-get clean
from time to time to free up disk space.
fatman
 
Posts: 13
Joined: 2009-12-12 01:24

Re: Dependency Issue Question

Postby fatman » 2009-12-13 17:28

Well, changing the repository seemed to work like a charm. I added:

Code: Select all
deb http://www.opensips.org/apt/ lenny main non-free contrib
deb-src http://www.opensips.org/apt/ lenny main non-free contrib


and voila:
Code: Select all
voip:~# aptitude search opensips
p   opensips                        - very fast and configurable SIP server
p   opensips-b2bua-module           - B2B User Agent modules for OpenSIPS
p   opensips-berkeley-module        - Berkeley Database module for OpenSIPS
p   opensips-carrierroute-module    - Carrierroute module for OpenSIPS
p   opensips-console                - OpenSIPS is a very fast and flexible SIP (
p   opensips-cpl-module             - CPL module (CPL interpreter engine) for Op
p   opensips-dbg                    - very fast and configurable SIP server [deb
p   opensips-dbhttp-module          - HTTP database connectivity module for Open
p   opensips-geoip-module           - IP address-to-location looku (MaxMind GeoI
p   opensips-identity-module        - SIP Identity module for OpenSIPS
p   opensips-jabber-module          - Jabber gateway module for OpenSIPS
p   opensips-ldap-modules           - LDAP modules for OpenSIPS
p   opensips-mysql-module           - MySQL database connectivity module for Ope
p   opensips-perl-modules           - Perl extensions and database driver for Op
p   opensips-postgres-module        - PostgreSQL database connectivity module fo
p   opensips-presence-modules       - SIMPLE presence modules for OpenSIPS
p   opensips-radius-modules         - radius modules for OpenSIPS
p   opensips-regex-module           - PCRE regexp modules for OpenSIPS
p   opensips-snmpstats-module       - SNMP AgentX subagent module for OpenSIPS
p   opensips-unixodbc-module        - unixODBC database connectivity module for
p   opensips-xmlrpc-module          - XMLRPC support for OpenSIPS's Management I
p   opensips-xmpp-module            - XMPP gateway module for OpenSIPS


I guess all i really need for opensips at the moment would be opensips, opensips-snmpstats-module, opensips-mysql-module and I can install other modules once I'm familirized.

Code: Select all
aptitude install opensips opensips-snmpstats-module opensips-mysql-module


I'll keep you guys posted on how things progress...

Thanks again,

Fatman
fatman
 
Posts: 13
Joined: 2009-12-12 01:24

Next

Return to Beginners Questions

Who is online

Users browsing this forum: No registered users and 6 guests

fashionable