我被赋予了一项任务,要求我学习PHP和Apache2。我的问题是我似乎无法正确设置我的开发环境。
我需要使用的PHP版本是php5.5.9;我相信我已经安装了。我自己编译并构建了PHP5.5.9包;我可以通过运行来看到这是成功的:
$ php --version
PHP 5.5.9 (cli) (built: Oct 25 2017 12:09:34)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
我现在的问题是我似乎无法让它在Apache2上运行。我仍然认为自己有点像Linux的新手,因此我很困惑。在设置更高版本的PHP时,我只需要运行:
$ apt-get install libapache2-mod-php7
但libapache2-mod-php5.5.9的软件包不存在于我能够找到的任何repo中,并从中下载,所以我假设我需要,只需libapache2-mod-php5,它会抛出以下内容错误。
The following packages have unmet dependencies.
fontconfig : PreDepends: dpkg (>= 1.16.1)
Depends: fontconfig-config but it is not going to be
installed
libapache2-mod-php5 : Depends: libssl1.0.0 (>= 1.0.0) but it is not
going to be installed
Depends: apache2-api-20120211
Depends: apache2 (>= 2.4) but it is not going to be installed
Depends: php5-common (= 5.5.9+dfsg-1ubuntu4.22) but it is not going to be installed
Depends: ucf but it is not going to be installed
Depends: tzdata but it is not going to be installed
Recommends: php5-cli but it is not going to be
installed
libblkid1 : Depends: libuuid1 (>= 2.16) but it is not going to be
installed
libfontconfig1 : Depends: fontconfig-config (= 2.11.94-0ubuntu1.1)
but it is not going to be installed
libgtk2.0-0 : Depends: libcairo2 (>= 1.6.4-6.1) but it is not going
to be installed
Depends: libpangocairo-1.0-0 (>= 1.28.3) but it is not
going to be installed
Depends: libpangoft2-1.0-0 (>= 1.28.3) but it is not
going to be installed
Recommends: libgtk2.0-bin
libqt5svg5 : PreDepends: dpkg (>= 1.15.6~)
Depends: libqt5widgets5 (>= 5.3.0) but it is not going
to be installed
libsm6 : Depends: libuuid1 (>= 2.16) but it is not going to be
installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be
caused by held packages.
我能找到的唯一建议是降级到Ubuntu 14.04,但目前这是不可能的,因为我正在将完全导出的MySQL数据库加载到我的机器上;这已经持续了好几个小时,我看不到它很快就会完成。由于时间有价值,有什么方法可以解决这个问题吗?