os pacotes têm dependências não atendidas - não é possível instalar pacotes

2

Estou tentando instalar o módulo do passageiro com o seguinte comando:

sudo passenger-install-apache2-module

E estou recebendo a seguinte saída:

 * GNU C++ compiler... found at /usr/bin/g++
 * Curl development headers with SSL support... found
 * OpenSSL development headers... found
 * Zlib development headers... found
 * Ruby development headers... found
 * OpenSSL support for Ruby... found
 * RubyGems... found
 * Rake... found at /usr/bin/rake
 * rack... found
 * Apache 2... found at /usr/sbin/apache2
 * Apache 2 development headers... not found
 * Apache Portable Runtime (APR) development headers... not found
 * Apache Portable Runtime Utility (APU) development headers... not found

E então está me pedindo para instalar:

 * To install Apache 2 development headers:
   Please run apt-get install apache2-prefork-dev as root.

 * To install Apache Portable Runtime (APR) development headers:
   Please run apt-get install libapr1-dev as root.

 * To install Apache Portable Runtime Utility (APU) development headers:
   Please run apt-get install libaprutil1-dev as root.

Mas quando estou correndo:

sudo apt-get install apache2-prefork-dev libapr1-dev libaprutil1-dev 


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:
  apache2-prefork-dev: Depends: apache2.2-common (= 2.2.14-5ubuntu8.10) but 2.2.20-1ubuntu1 is to be installed
  libapr1-dev: Depends: libapr1 (= 1.3.8-1ubuntu0.3) but 1.4.5-1 is to be installed
  libaprutil1-dev: Depends: libpcre3-dev but it is not going to be installed
E: Broken packages

Eu tenho ruby1.8.7, rubygem1.8.24, rails3.2.9 instalado.

vim /etc/apt/sources.list

#############################################################
################### OFFICIAL UBUNTU REPOS ###################
#############################################################
###### Ubuntu Main Repos
deb http://fr.archive.ubuntu.com/ubuntu/ lucid main restricted universe multiverse
deb-src http://fr.archive.ubuntu.com/ubuntu/ lucid main restricted universe multiverse

###### Ubuntu Update Repos
deb http://fr.archive.ubuntu.com/ubuntu/ lucid-security main restricted universe multiverse
deb http://fr.archive.ubuntu.com/ubuntu/ lucid-updates main restricted universe multiverse
deb http://fr.archive.ubuntu.com/ubuntu/ lucid-proposed main restricted universe multiverse
deb http://fr.archive.ubuntu.com/ubuntu/ lucid-backports main restricted universe multiverse
deb-src http://fr.archive.ubuntu.com/ubuntu/ lucid-security main restricted universe multiverse
deb-src http://fr.archive.ubuntu.com/ubuntu/ lucid-updates main restricted universe multiverse
deb-src http://fr.archive.ubuntu.com/ubuntu/ lucid-proposed main restricted universe multiverse
deb-src http://fr.archive.ubuntu.com/ubuntu/ lucid-backports main restricted universe multiverse

###### Ubuntu Partner Repo
deb http://archive.canonical.com/ubuntu lucid partner
deb-src http://archive.canonical.com/ubuntu lucid partner

vim /etc/apt/sources.list.d

" ============================================================================
" Netrw Directory Listing                                        (netrw v136)
"   /etc/apt/sources.list.d
"   Sorted by      name
"   Sort sequence: [\/]$,\<core\%(\.\d\+\)\=\>,\.h$,\.c$,\.cpp$,*,\.o$,\.obj$,\.info$,\.swp$,\.bak$,\~$
"   Quick Help: <F1>:help  -:go up dir  D:delete  R:rename  s:sort-by  x:exec
" ============================================================================
../
mercurial-ppa-releases-lucid.list
mercurial-ppa-releases-lucid.list.save
.mercurial-ppa-releases-lucid.list.swp
    
por Subhransu Mishra 12.12.2012 / 10:41

3 respostas

2

você já tentou aptitude em vez de apt-get?

eu acho que você também precisa instalar o pacote "build-essential", ele é necessário para compilar o código-fonte

    
por 12.12.2012 / 13:51
1
O

passageiro-instale-apache2-module é para download e instalação manuais. Existe uma razão específica ou requisito para usar o passageiro-install-apache2-module para a instalação?

A maneira "ubuntu" (bem, a razão de usar uma distro: D) é usar o seguinte

sudo apt-get install libapache2-mod-passenger

Isso deve incluir todas as dependências e principalmente o pacote pré-compilado.

Ele também permitirá que o mod passageiro do apache também

ls -l /etc/apache2/mods-enabled
lrwxrwxrwx 1 root root 32 Dec 12 09:50 passenger.conf -> ../mods-available/passenger.conf
lrwxrwxrwx 1 root root 32 Dec 12 09:50 passenger.load -> ../mods-available/passenger.load

Um pouco mais de informação, se você é novo no Ubuntu, para pacotes relacionados ao apache, eles geralmente começam com libapache2 - , então se você fizer apt-get instale o libapache (pressione tab tab ) , lhe dará o seguinte

# apt-get install libapache 
Display all 108 possibilities? (y or n)
libapache2-authcassimple-perl     libapache2-mod-proxy-html
libapache2-authcookie-perl        libapache2-mod-python
libapache2-authenntlm-perl        libapache2-mod-python-doc
libapache2-mod-apparmor           libapache2-mod-qos
libapache2-mod-apreq2             libapache2-mod-random
libapache2-mod-auth-cas           libapache2-mod-removeip
libapache2-mod-auth-kerb          libapache2-mod-rivet
libapache2-mod-auth-mysql         libapache2-mod-rivet-doc
libapache2-mod-authn-sasl         libapache2-mod-rpaf
libapache2-mod-auth-ntlm-winbind  libapache2-mod-ruby
libapache2-mod-authn-webid        libapache2-mod-ruwsgi
libapache2-mod-authn-yubikey      libapache2-mod-ruwsgi-dbg
libapache2-mod-authnz-external    libapache2-mod-scgi
libapache2-mod-auth-openid        libapache2-modsecurity
libapache2-mod-auth-pam           libapache2-mod-shib2
libapache2-mod-auth-pgsql         libapache2-mod-spamhaus
libapache2-mod-auth-plain         libapache2-mod-speedycgi
libapache2-mod-auth-radius        libapache2-mod-suphp
libapache2-mod-auth-sys-group     libapache2-mod-upload-progress
libapache2-mod-authz-unixgroup    libapache2-mod-uwsgi
libapache2-mod-axis2c             libapache2-mod-uwsgi-dbg
libapache2-mod-bw                 libapache2-mod-vhost-hash-alias
libapache2-mod-defensible         libapache2-mod-vhost-ldap
libapache2-mod-dnssd              libapache2-mod-wsgi
libapache2-mod-encoding           libapache2-mod-wsgi-py3
libapache2-mod-evasive            libapache2-mod-xsendfile
libapache2-mod-fastcgi            libapache2-reload-perl
libapache2-mod-fcgid              libapache2-request-perl
libapache2-mod-fcgid-dbg          libapache2-svn
libapache2-mod-geoip              libapache2-webauth
libapache2-mod-gnutls             libapache2-webkdc
libapache2-mod-jk                 libapache-admin-config-perl
libapache2-mod-layout             libapache-asp-perl
libapache2-mod-ldap-userdir       libapache-authenhook-perl
libapache2-mod-ldap-userdir-dbg   libapache-authznetldap-perl
libapache2-mod-lisp               libapache-dbilogger-perl
libapache2-mod-log-sql            libapache-dbi-perl
libapache2-mod-log-sql-dbi        libapache-db-perl
libapache2-mod-log-sql-mysql      libapache-gallery-perl
libapache2-mod-log-sql-ssl        libapache-htgroup-perl
libapache2-mod-macro              libapache-htpasswd-perl
libapache2-mod-mime-xattr         libapache-mime4j-java
libapache2-mod-mono               libapache-mime4j-java-doc
libapache2-mod-musicindex         libapache-mod-auth-kerb
libapache2-mod-neko               libapache-mod-jk-doc
libapache2-mod-nss                libapache-mod-security
libapache2-mod-ocamlnet           libapache-poi-java
libapache2-mod-parser3            libapache-poi-java-doc
libapache2-mod-passenger          libapache-pom-java
libapache2-mod-perl2              libapache-ruby1.8
libapache2-mod-perl2-dev          libapache-session-perl
libapache2-mod-perl2-doc          libapache-session-wrapper-perl
libapache2-mod-php5               libapache-sessionx-perl
libapache2-mod-php5filter         libapache-singleton-perl
    
por 12.12.2012 / 15:48
0

Primeiro, certifique-se de executar apt-get update para atualizar a lista de versões de pacotes disponíveis para instalação. Este não é seu único problema aqui, mas este erro pode ser causado por não ter corrido apt-get update recentemente.

Você instalou alguns pacotes de backports. Estas são versões mais recentes de pacotes que são instalados apenas sob demanda. Com o software multi-pacote, como o Apache, você geralmente precisa combinar todos os pacotes que fazem parte do mesmo software: 2.2.14 ou 2.2.20. Os pacotes de Backport são instalados apenas em pedidos explícitos: apache2.2-common está sendo extraído da distribuição regular (2.2.14), mas algo em seu sistema requer um componente Apache dos backports (2.2.20).

Eu não acho que os erros de apt-get forneçam informações suficientes para descobrir o que fazer. Em casos como esse, recomendo executar aptitude interativamente e seguir uma de suas sugestões de resolução de conflitos ou selecionar manualmente as versões de pacote que você deseja instalar.

    
por 13.12.2012 / 03:02

Tags