The Perfect Server - 7.10 Server (PHP5 & PHP5 Packages Install Snag)

Discussion in 'HOWTO-Related Questions' started by giganet, Oct 22, 2007.

  1. giganet

    giganet New Member

    When it comes time to install PHP5 and it's upporting modules:
    http://howtoforge.com/perfect_server_ubuntu7.10_p6
    Code:
    root@giganetwireless:/home/bender# apt-get install libapache2-mod-php5 php5 php5-common php5-curl php5-dev php5-gd php5-idn php-pear php5-imagick php5-imap php5-json php5-mcrypt php5-memcache php5-mhash php5-ming php5-mysql php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl
    I receive the following error:
    Code:
    Note, selecting php5-common instead of php5-json
    Some packages could not be installed. This may mean that you have
    requested an impossible situation or if you are using the unstable
    distribution that some required packages have not yet been created
    or been moved out of Incoming.
    The following information may help to resolve the situation:
    
    The following packages have unmet dependencies:
      php5-idn: Depends: phpapi-20060613+lfs
      php5-imagick: Depends: phpapi-20060613+lfs
      php5-memcache: Depends: phpapi-20060613+lfs
      php5-ming: Depends: phpapi-20060613+lfs
      php5-ps: Depends: phpapi-20060613+lfs
      php5-snmp: Depends: libsnmp9 (>= 5.2.3) but it is not installable
    E: Broken packages
    
    I ran 'apt-get build-dep' on the 7 problem packages listed above.
    The output of this command follows:
    Code:
    root@giganetwireless:/home/bender# apt-get build-dep php5-idn
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    The following NEW packages will be installed:
      automake1.4 debhelper gettext html2text intltool-debian libidn11-dev
      libssl-dev php5-common php5-dev pkg-config po-debconf shtool
    0 upgraded, 12 newly installed, 0 to remove and 0 not upgraded.
    Need to get 5966kB of archives.
    After unpacking 20.8MB of additional disk space will be used.
    Do you want to continue [Y/n]? y
    WARNING: The following packages cannot be authenticated!
      php5-common php5-dev
    Install these packages without verification [y/N]? n
    E: Some packages could not be authenticated
    E: Failed to process build dependencies
    root@giganetwireless:/home/bender# apt-get build-dep php5-imagick
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    The following NEW packages will be installed:
      automake1.4 debhelper dpatch gettext gsfonts html2text intltool-debian
      libbz2-dev libexif-dev libexif12 libexpat1-dev libfreetype6-dev libice-dev
      libjasper-dev libjasper1 libjpeg62-dev liblcms1 liblcms1-dev libltdl3-dev
      libmagick9 libmagick9-dev libpng12-dev libsm-dev libssl-dev libtiff4-dev
      libtiffxx0c2 libwmf-dev libwmf0.2-7 libx11-dev libxau-dev libxdmcp-dev
      libxext-dev libxml2-dev libxt-dev php5-common php5-dev po-debconf shtool
      x11proto-core-dev x11proto-input-dev x11proto-kb-dev x11proto-xext-dev
      xtrans-dev
    0 upgraded, 43 newly installed, 0 to remove and 0 not upgraded.
    Need to get 27.4MB of archives.
    After unpacking 78.3MB of additional disk space will be used.
    Do you want to continue [Y/n]? n
    Abort.
    root@giganetwireless:/home/bender# apt-get build-dep php5-memcache
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    The following NEW packages will be installed:
      automake1.4 cdbs debhelper diffstat gawk gettext html2text intltool-debian
      libssl-dev php5-common php5-dev po-debconf quilt shtool
    0 upgraded, 14 newly installed, 0 to remove and 0 not upgraded.
    Need to get 6530kB of archives.
    After unpacking 23.3MB of additional disk space will be used.
    Do you want to continue [Y/n]? n
    Abort.
    root@giganetwireless:/home/bender# apt-get build-dep php5-ming
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    The following NEW packages will be installed:
      automake1.4 debhelper docbook docbook-to-man gettext html2text
      intltool-debian libfreetype6-dev libpng12-dev libsp1c2 libssl-dev
      libungif4-dev libungif4g php5-common php5-dev po-debconf python-all
      python-all-dev python-dev python2.4 python2.4-dev python2.4-minimal
      python2.5-dev sgml-base sgml-data shtool sp swig ttf-opensymbol xml-core
    0 upgraded, 30 newly installed, 0 to remove and 0 not upgraded.
    Need to get 17.0MB of archives.
    After unpacking 62.0MB of additional disk space will be used.
    Do you want to continue [Y/n]? n
    Abort.
    root@giganetwireless:/home/bender# apt-get build-dep php5-ps
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    The following NEW packages will be installed:
      automake1.4 debhelper gettext html2text intltool-debian libjpeg62-dev
      libpng12-dev libssl-dev libungif4-dev libungif4g libxslt1.1 php5-common
      php5-dev po-debconf pslib-dev pslib1 shtool xsltproc
    0 upgraded, 18 newly installed, 0 to remove and 0 not upgraded.
    Need to get 6352kB of archives.
    After unpacking 22.5MB of additional disk space will be used.
    Do you want to continue [Y/n]? n
    Abort.
    root@giganetwireless:/home/bender# apt-get build-dep  php5-snmp
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    E: Build-Depends dependency for php5 cannot be satisfied because the package apache-dev cannot be found
    root@giganetwireless:/home/bender# apt-get install apache-dev
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    E: Couldn't find package apache-dev
    
    With respect to the last 'apt-get build-dep' command above- I tried running 'apt-get install apache-dev' and received the following error:
    Code:
    root@giganetwireless:/home/bender# apt-get install apache-dev
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    E: Couldn't find package apache-dev
    At this point I feel that running the 'apt-get build-dep' command with all 7 problem packages and say 'Y' to installation of those dependent packages I should then be able to start over with the PH5 install and it should then install correctly wouldn't it?

    What would be the best solution to working around this issue?

    Thank you for your help

    Regards
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Please run:

    apt-get update

    and try to install the php packages again. If this still does not work, post the content of /etc/apt/sources.list
     
  3. giganet

    giganet New Member

    Thank you Till...

    I ran 'apt-get update' then attempted re-installing PHP5 and it's modules with the same results.
    Actually tried running 'apt-get update' then 'apt-get upgrade' then re-attempting to install PHP5 prior to posting this q :)

    The contents of '/etc/apt/sources.list' follows:
    Code:
    deb http://us.archive.ubuntu.com/ubuntu/ gutsy main restricted
    deb-src http://us.archive.ubuntu.com/ubuntu/ gutsy main restricted
    
    ## Major bug fix updates produced after the final release of the
    ## distribution.
    deb http://us.archive.ubuntu.com/ubuntu/ gutsy-updates main restricted
    deb-src http://us.archive.ubuntu.com/ubuntu/ gutsy-updates main restricted
    
    # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
    # newer versions of the distribution.
    
    ## MySQL Update links provided by Falko Timme HowToForge.com (projectfarm.org)
    ## Must add to sources.list then run apt-get update & apt-get upgrade.
    deb http://packages.dotdeb.org stable all
    deb-src http://packages.dotdeb.org stable all
    
    deb http://us.archive.ubuntu.com/ubuntu/ gutsy main restricted
    deb-src http://us.archive.ubuntu.com/ubuntu/ gutsy main restricted
    
    ## Major bug fix updates produced after the final release of the
    ## distribution.
    deb http://us.archive.ubuntu.com/ubuntu/ gutsy-updates main restricted
    deb-src http://us.archive.ubuntu.com/ubuntu/ gutsy-updates main restricted
    
    ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
    ## team, and may not be under a free licence. Please satisfy yourself as to
    ## your rights to use the software. Also, please note that software in
    ## universe WILL NOT receive any review or updates from the Ubuntu security
    ## team.
    deb http://us.archive.ubuntu.com/ubuntu/ gutsy universe
    deb-src http://us.archive.ubuntu.com/ubuntu/ gutsy universe
    deb http://us.archive.ubuntu.com/ubuntu/ gutsy-updates universe
    deb-src http://us.archive.ubuntu.com/ubuntu/ gutsy-updates universe
    
    ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
    ## team, and may not be under a free licence. Please satisfy yourself as to
    ## your rights to use the software. Also, please note that software in
    ## multiverse WILL NOT receive any review or updates from the Ubuntu
    ## security team.
    deb http://us.archive.ubuntu.com/ubuntu/ gutsy multiverse
    deb-src http://us.archive.ubuntu.com/ubuntu/ gutsy multiverse
    deb http://us.archive.ubuntu.com/ubuntu/ gutsy-updates multiverse
    deb-src http://us.archive.ubuntu.com/ubuntu/ gutsy-updates multiverse
    
    Looking here I do see a few duplicates that I will get rid of.

    Regards
     
  4. giganet

    giganet New Member

    I removed the duplicate entry in '/etc/apt/sources.list', re-ran 'apt-get update' then 'apt-get-upgrade'.

    After running those commands though I am still in the same boat, when I attempt to install PHP5 and it's packages- The installation fails with the same error.


    Thanking you in advance for your time and help...


    Regards
     
  5. falko

    falko Super Moderator Howtoforge Staff

    Why did you add the dotdeb repository to your sources.list? Gutsy comes with MySQL5 and PHP5, so there's no need for the dotdeb packages.
     
  6. giganet

    giganet New Member

    'Why did you add the dotdeb repository to your sources.list?'

    Assumptive I guess, I just thought it would be needed as in Dapper...

    Anyhow thank you Falko- that resolved my issue and PHP5 is installing smoothly now <@;-)

    Regards
     
  7. geek.de.nz

    geek.de.nz New Member

    almost the same problem

    Hi,

    This is my sources list:
    Code:
    deb http://ftp.de.debian.org/debian/ etch main contrib non-free
    #deb http://ftp.de.debian.org/debian experimental main
    deb-src http://ftp.de.debian.org/debian/ etch main contrib non-free
    
    #deb http://security.debian.org/ etch updates main
    
    #deb http://www.backports.org/debian stable ucf
    #deb http://people.debian.org/~dexter php5 woody
    #deb-src http://people.debian.org/~dexter php5 woody
    
    
    # ### added for support of php5
    # ## France
    #deb http://packages.dotdeb.org stable all
    #deb-src http://packages.dotdeb.org stable all
    
    I have recently removed (commented out) the dotdeb sources. When I do the line:
    Code:
    apt-get install libapache2-mod-php5 php5 php5-common php5-curl php5-dev php5-gd php5-idn php-pear php5-imagick php5-imap php5-json php5-mcrypt php5-memcache php5-mhash php5-ming php5-mysql php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl
    I get:
    Code:
    Reading package lists... Done
    Building dependency tree... Done
    libapache2-mod-php5 is already the newest version.
    php5 is already the newest version.
    php5-common is already the newest version.
    php5-curl is already the newest version.
    php5-dev is already the newest version.
    php5-gd is already the newest version.
    php5-imap is already the newest version.
    php5-mhash is already the newest version.
    php5-mysql is already the newest version.
    Some packages could not be installed. This may mean that you have
    requested an impossible situation or if you are using the unstable
    distribution that some required packages have not yet been created
    or been moved out of Incoming.
    The following information may help to resolve the situation:
    
    The following packages have unmet dependencies:
      php5-mcrypt: Depends: php5-common (= 5.2.0-8+etch13) but 5.2.6-0.dotdeb.1 is to be installed
      php5-pspell: Depends: php5-common (= 5.2.0-8+etch13) but 5.2.6-0.dotdeb.1 is to be installed
      php5-recode: Depends: php5-common (= 5.2.0-8+etch13) but 5.2.6-0.dotdeb.1 is to be installed
      php5-snmp: Depends: php5-common (= 5.2.0-8+etch13) but 5.2.6-0.dotdeb.1 is to be installed
      php5-sqlite: Depends: php5-common (= 5.2.0-8+etch13) but 5.2.6-0.dotdeb.1 is to be installed
      php5-tidy: Depends: php5-common (= 5.2.0-8+etch13) but 5.2.6-0.dotdeb.1 is to be installed
      php5-xmlrpc: Depends: php5-common (= 5.2.0-8+etch13) but 5.2.6-0.dotdeb.1 is to be installed
      php5-xsl: Depends: php5-common (= 5.2.0-8+etch13) but 5.2.6-0.dotdeb.1 is to be installed
    E: Broken packages
    
    However, when I uncomment the dotdeb lines in sources.list, it tells me this:
    Code:
    Reading package lists... Done
    Building dependency tree... Done
    The following packages have been kept back:
      libkrb5-17-heimdal libmysqlclient15-dev openssh-client openssh-server
    The following packages will be upgraded:
      libapache-mod-php5 libapache2-mod-php5 mysql-common php5 php5-cli php5-common php5-curl php5-dev php5-gd php5-imap php5-ldap
      php5-mhash php5-mysql php5-odbc
    14 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
    Need to get 9141kB of archives.
    After unpacking 160kB of additional disk space will be used.
    Do you want to continue [Y/n]? 
    WARNING: The following packages cannot be authenticated!
      php5-cli libapache2-mod-php5 php5-mysql php5-mhash php5-imap php5-ldap php5-curl php5-gd php5-odbc libapache-mod-php5
      php5-common mysql-common php5 php5-dev
    Install these packages without verification [y/N]? 
    
    It's a bit of a dilemma because I tried downgrading the php version before but failed. Since I have a cron job, which runs apt-get update every week and apt-get -S uprade (cant remember the exact parameter for simulate) and emails me the output, so that i can upgrade if necessary, it would be nice, if I wouldn always get an email saying, that apt-get failed etc. I would like to only bother logging in when I know it is necessary to do an upgrade.

    Please help. I've been stuck on this for ages now.
     
  8. falko

    falko Super Moderator Howtoforge Staff

    You could try to uninstall all PHP5 packages and then install them again.
     
  9. geek.de.nz

    geek.de.nz New Member

    Thank you

    Thank you. I was trying to avoid that though, because this is a live server.
     

Share This Page