搜尋

首頁  >  問答  >  主體

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: 無法修正錯誤,因為您要求某些軟件包保持現狀,就是它們破壞了軟件包間的依賴關係。

大家讲道理大家讲道理2895 天前1119

全部回覆(1)我來回復

  • 怪我咯

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

    我在重現下這個問題。是在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

    
        [yaf]
            yaf.environ = product
            yaf.library = NULL
            yaf.cache_config = 0
            yaf.name_suffix = 1
            yaf.name_separator = ""
            yaf.forward_limit = 5
            yaf.use_namespace = 0
            yaf.use_spl_autoload = 0
            extension=yaf.so
    

    最後重啟下apache

    sudo /etc/init.d/apache2 restart

    最後來個圖

    回覆
    0
  • 取消回覆