ホームページ  >  に質問  >  本文

ubuntu 14.10 安装 libpcre3-dev错误-安装swoole扩展错误

已经安装了

tb250@tb:/etc/dpkg/dpkg.cfg.d$ sudo dpkg -l |grep libpcre3
ii  libpcre3:amd64                      1:8.35-3ubuntu1                  amd64        Perl 5 Compatible Regular Expression Library - runtime files
tb250@tb:/etc/dpkg/dpkg.cfg.d$ sudo apt-get install libpcre3-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
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:
 libpcre3-dev : Depends: libpcre3 (= 1:8.31-2ubuntu2.1) but 1:8.35-3ubuntu1 is to be installed
E: Unable to correct problems, you have held broken packages.
tb250@tb:/etc/dpkg/dpkg.cfg.d$ 

google了半天 -f 之类的参数都用了,哪位大神给个思路?

==================2016-6-16==错误重现

root@tb:/home/tb/swoole-src-swoole-1.8.5-stable# apt-get install libpcre3 libpcre3-dev
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
libpcre3 已经是最新的版本了。
有一些软件包无法被安装。如果您用的是 unstable 发行版,这也许是
因为系统无法达到您要求的状态造成的。该版本中可能会有一些您需要的软件
包尚未被创建或是它们已被从新到(Incoming)目录移出。
下列信息可能会对解决问题有所帮助:

下列软件包有未满足的依赖关系:
libpcre3-dev : 依赖: libpcre3 (= 1:8.31-2ubuntu2.2) 但是 1:8.31-2ubuntu2.3 正要被安装
E: 无法修正错误,因为您要求某些软件包保持现状,就是它们破坏了软件包间的依赖关系。

大家讲道理大家讲道理2739日前997

全員に返信(1)返信します

  • 怪我咯

    怪我咯2017-04-22 08:58:16

    この問題を再現しています。これは、yaf 拡張機能を ubuntu にインストールするときです。 ubuntu上安装yaf扩展的时候。
    一路tar zxvf cd phpize ,到make的时候,提示inluce pcre.h 不存在,

     fatal error: pcre.h: No such file or directory
     #include "pcre.h"
                      ^
    compilation terminated.
    make: *** [phalcon.lo] Erreur 1

    那我就安装

     apt-get update
     apt-get install libpcre3 libpcre3-dev 

    然后就报了类似上面的第二张图中错误,

    大概意思是他要安装ibpcre3-dev,需要libpcre3 (= 1:8.31-2ubuntu2.1)的版本,但是目前给我安装的是1:8.35-3ubuntu1 ,
    我开始想remove后面的这个版本,发现需要很多依赖。索性我装一个你需要的版本,所以我就搜索1:8.31-2ubuntu2.1 安装了他需要的依赖包,一路configure make install 下来,居然神奇的装好了,

    tb250@tb:/usr/lib/php5/20121212$ ls -l /usr/local/include/
    total 84
    -rw-r--r-- 1 root root  6783 Nov 10 18:54 pcrecpparg.h
    -rw-r--r-- 1 root root 26529 Nov 10 18:54 pcrecpp.h
    -rw-r--r-- 1 root root 23378 Nov 10 18:54 pcre.h
    -rw-r--r-- 1 root root  5452 Nov 10 18:54 pcreposix.h
    -rw-r--r-- 1 root root  6600 Nov 10 18:54 pcre_scanner.h
    -rw-r--r-- 1 root root  6253 Nov 10 18:54 pcre_stringpiece.h
    

    然后我再次在yaf 目录下make的时候,也就成功了,make install 也就过去了

        See any operating system documentation about shared libraries for
        more information, such as the ld(1) and ld.so(8) manual pages.
        ----------------------------------------------------------------------
        Installing shared extensions:     /usr/lib/php5/20121212/
    

    然后编辑下 sudo vim /etc/php5/apache2/php.ini tar zxvf cd phpize まですべて完了し、make に到達したら、 inluce pcre.h が存在しないというプロンプトが表示されます。

    リーリー

    それではインストールしていきます

    リーリー

    その後、上の 2 番目の画像と同様のエラーを報告しました。

    🎜おそらく彼は ibpcre3-dev をインストールしたいことを意味します。それには libpcre3 のバージョン (= 1:8.31-2ubuntu2.1) が必要ですが、現在私にインストールされているのは 1:8.35-3ubuntu1 です。🎜 私は次のように考え始めました。 removeこの新しいバージョンでは、多くの依存関係が必要であることが判明しました。必要なバージョンをインストールしただけなので、1:8.31-2ubuntu2.1 を検索し、configure make install を実行して、必要な依存関係パッケージをインストールしました。魔法のようにインストールされました、🎜 リーリー 🎜その後、yafディレクトリに再度makeすると成功し、make installが終了しました🎜 リーリー 🎜次に、sudo vim /etc/php5/apache2/php.ini を編集します🎜 リーリー 🎜最後にApacheを再起動します🎜 リーリー 🎜最後の写真🎜🎜🎜🎜🎜

    返事
    0
  • キャンセル返事