2017-07-06 28 views
2

我正在使用shippable來構建我的項目,並且它的一部分需要PHP。在Ubuntu 14.04上安裝PHP 7現在失敗,因爲無法解決libssl依賴項?

構建腳本是這樣的:

apt-get update 
apt-get install -y software-properties-common python-software-properties language-pack-en-base 
LC_ALL=en_US.UTF-8 add-apt-repository ppa:ondrej/php 
apt-get update 
apt-get install -y php7.0 php7.0-bcmath 

今天,當出現以下錯誤安裝PHP構建失敗:

apt-get install -y php7.0 php7.0-bcmath 

Reading package lists... 
Building dependency tree... 
Reading state information... 
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: 
php7.0 : Depends: libapache2-mod-php7.0 but it is not going to be installed or 
        php7.0-fpm but it is not going to be installed or 
        php7.0-cgi but it is not going to be installed 
      Depends: php7.0-common but it is not going to be installed 
php7.0-bcmath : Depends: php7.0-common but it is not going to be installed 
E: Unable to correct problems, you have held broken packages. 

所以我就開始了一個當地碼頭工人的容器,看看什麼奇怪的是使用以下命令發生:

docker run -i -t ubuntu:14.04 /bin/bash 

並跑了上面列出的5條構建線,並且我得到相同的錯誤。我做的下一件事就是安裝​​,看看我是否能得到一個更好的錯誤,並運行此aptitude install -y php7.0 php7.0-bcmath - 這是天賦輸出:

aptitude install -y php7.0 php7.0-bcmath 
The following NEW packages will be installed: 
    apache2{a} apache2-bin{a} apache2-data{a} libapache2-mod-php7.0{ab} 
    libapr1{a} libaprutil1{a} libaprutil1-dbd-sqlite3{a} libaprutil1-ldap{a} 
    libedit2{a} php-common{a} php7.0 php7.0-bcmath php7.0-cli{ab} 
    php7.0-common{ab} php7.0-json{a} php7.0-opcache{a} php7.0-readline{a} 
    psmisc{a} ssl-cert{a} 
0 packages upgraded, 19 newly installed, 0 to remove and 7 not upgraded. 
Need to get 4950 kB of archives. After unpacking 20.2 MB will be used. 
The following packages have unmet dependencies: 
php7.0-cli : Depends: libssl1.1 (>= 1.1.0) which is a virtual package. 
php7.0-common : Depends: libssl1.1 (>= 1.1.0) which is a virtual package. 
libapache2-mod-php7.0 : Depends: libssl1.1 (>= 1.1.0) which is a virtual package. 
The following actions will resolve these dependencies: 

    Keep the following packages at their current version: 
1)  libapache2-mod-php7.0 [Not Installed]    
2)  php7.0 [Not Installed]        
3)  php7.0-bcmath [Not Installed]      
4)  php7.0-cli [Not Installed]       
5)  php7.0-common [Not Installed]      
6)  php7.0-json [Not Installed]       
7)  php7.0-opcache [Not Installed]      
8)  php7.0-readline [Not Installed]      



The following NEW packages will be installed: 
    psmisc{a} 
0 packages upgraded, 1 newly installed, 0 to remove and 7 not upgraded. 
Need to get 53.2 kB of archives. After unpacking 229 kB will be used. 
Get: 1 http://archive.ubuntu.com/ubuntu/ trusty/main psmisc amd64 22.20-1ubuntu2 [53.2 kB] 
Fetched 53.2 kB in 0s (911 kB/s) 
Selecting previously unselected package psmisc. 
(Reading database ... 14894 files and directories currently installed.) 
Preparing to unpack .../psmisc_22.20-1ubuntu2_amd64.deb ... 
Unpacking psmisc (22.20-1ubuntu2) ... 
Setting up psmisc (22.20-1ubuntu2) ... 

我有幾個問題:

1)我該如何解決?我已經做了一些尋找,但不能解決如何更新libssl

2)爲什麼突然間發生這種情況,這對於PHP7.0來說從來不是問題?

一些額外的信息:

openssl version -a 
OpenSSL 1.0.1f 6 Jan 2014 
built on: Mon Jan 30 20:38:38 UTC 2017 
platform: debian-amd64 
options: bn(64,64) rc4(16x,int) des(idx,cisc,16,int) blowfish(idx) 
compiler: cc -fPIC -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -m64 -DL_ENDIAN -DTERMIO -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wa,--noexecstack -Wall -DMD32_REG_T=int -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM 
OPENSSLDIR: "/usr/lib/ssl" 

uname -a 
Linux b5cbe94d7da8 4.9.13-moby #1 SMP Sat Mar 25 02:48:44 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux 
+0

這是同樣的問題嗎? https://askubuntu.com/questions/462094/unable-to-install-libssl1-0-0i386-due-to-unmet-dependencies –

+0

我認爲這是在StackOverflow的offtopic。這屬於Ask Ubuntu或其他東西。 –

+0

@TahaPaksu作爲一名Ubuntu管理員我可以說:「不,但它是一個類似的問題,它是由程序員/用戶指定的存儲庫,而不是用於構建事物的腳本,並最終無法通過最終用戶或創建軟件包的人員。「它需要由運行該存儲庫的人員解決/ PPA –

回答

3

的PPA維護者 '固定' 這個,according to a GitHub issue

回答您的問題:

1) How do i fix this? I have done some looking but can't work out how to update libssl

的PPA已經確定了,但下一次,請在適當的地方填寫的問題 - 例如, issue tracker

2) Why has this happened all of a sudden, this was never a problem for PHP7.0 before?

ppa:ondrej/php的軟件包完整構建依賴於ppa:ondrej/apache2最近已更新到1.1.0的OpenSSL庫,以及那些被PHP的最新版本回升。必須使用OpenSSL 1.1.0庫更新ppa:ondrej/php以及此舉的結果。

偶爾會發生一個或兩個錯誤,只要臭蟲在適當的位置填滿,它就會被修復。

即使在相同的二進制文件中混合使用更多版本的OpenSSL也是完全安全的OpenSSL使用合適的SONAME s,並且共享庫中的所有符號都是versioned