How to install Apache with PHP 7.0 on Ubuntu 16.04 using puppetlabs-apache - php-7

I moved the question to the server fault site.
I want to install Apache with PHP 7.0 on Ubuntu 16.04 using Puppet Labs Apache module.
Following the documentation the module supports Ubuntu 16.04.
There is a ticket related with PHP 7.0 support and there is an accepted merge request which should add PHP 7.0 support.
It looks like the fix provided in the merge is not included in module 1.9.0 version.
The questions are
Is there any way how I can use the suggested fix and install Apache with PHP 7.0?
What should I write in the manifest?
The following code (from Puppet manifest) does not work on Ubuntu 16.04
class { 'apache':
mpm_module => 'prefork',
}
include apache::mod::php
I've got the following error
Error: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install libapache2-mod-php5' returned 100: Reading package lists...
Building dependency tree...
Reading state information...
Package libapache2-mod-php5 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'libapache2-mod-php5' has no installation candidate
Error: /Stage[main]/Apache::Mod::Php/Apache::Mod[php5]/Package[libapache2-mod-php5]/ensure: change from purged to present failed: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install libapache2-mod-php5' returned 100: Reading package lists...
Building dependency tree...
Reading state information...
Package libapache2-mod-php5 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'libapache2-mod-php5' has no installation candidate
I tried to configure FastCGI servers to handle PHP files but this fails too with almost the same error message. The module knows nothing about PHP 7.0 yet.

Related

Centos 8, yum update command not working. given following error. can't find php-common-7.2

I've tried to remove php-common-7.2 but couldn't find where it located.
Problem: package php-pecl-igbinary-3.2.2-1.el8.remi.7.2.x86_64 requires php(api) = 20170718-64, but none of the providers can be installed
- package php-pecl-igbinary-3.2.2-1.el8.remi.7.2.x86_64 requires php(zend-abi) = 20170718-64, but none of the providers can be installed
- cannot install both php-common-7.2.34-3.el8.remi.x86_64 and php-common-7.4.16-1.el8.remi.x86_64
- cannot install both php-common-7.2.34-4.el8.remi.x86_64 and php-common-7.4.16-1.el8.remi.x86_64
- cannot install the best update candidate for package php-pecl-igbinary-3.2.1-1.el8.remi.7.4.x86_64
- problem with installed package php-common-7.4.16-1.el8.remi.x86_64
- package php-common-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64 is filtered out by modular filtering
(try to add '--allowerasing' to command line to replace conflicting packages or '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
My server configuration is
NAME="CentOS Linux"
VERSION="8"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="8"
PLATFORM_ID="platform:el8"
PRETTY_NAME="CentOS Linux 8"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:8"
HOME_URL="https://centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-8"
CENTOS_MANTISBT_PROJECT_VERSION="8"
Apache Web Server
php7.4-cli
using Webmin & virtaulmin`
You are trying to install igbinary extension for PHP 7.2 with PHP 7.4. This cannot work.
For a proper configuration, please follow the Wizard instructions
And not enough information for more help:
rpm -qa php\*
dnf repolist
dnf module list PHP

spa/meson.build:29:4: ERROR: Dependency "bluez" not found, tried pkgconfig and cmake while installing PIPEWIRE in Ubuntu 16.04

I am trying to install Pipewire in my Ubuntu 16.04 x86 amd64 machine using instructions found here : https://pipewire.org/#getting
./autogen.sh --prefix=$PREFIX
On running the above command, I get this error
spa/meson.build:29:4: ERROR: Dependency "bluez" not found, tried pkgconfig and cmake
I have installed bluez already. This is the output for running
**sudo apt-get install bluez**
Reading package lists... Done
Building dependency tree
Reading state information... Done
bluez is already the newest version (5.37-0ubuntu5.3).
0 upgraded, 0 newly installed, 0 to remove and 19 not upgraded.
The files that are required to do development on top of a package are often separate (since this is really only needed by developers, and would take up too much size for no reason otherwise).
In your case, the package you're looking for is libbluetooth-dev. So you can do sudo apt install libbluetooth-dev

Install Pycurl after mac update to High Sierra - SSL error

I updated my mac to high sierra, and now I can't install pycurl. It fails with this message : Curl is configured to use SSL, but we have not been able to determine which SSL backend it is using. Please see PycURL documentation for how to specify the SSL backend manually.
I searched on the documentation and the web and I found some solution that not fix my problem. the most popular is this one :
pip uninstall pycurl
export PYCURL_SSL_LIBRARY=openssl
pip install pycurl
here is the complete error
A solution similar to the one you found worked for me when issued from within my virtualenv. I use Homebrew as a package manager on macOS High Sierra, and Pipenv to manage my project dependencies and virtualenv. The error emerged after adding the PyVimeo API Library, which has PycURL as a dependency, to my project.
The generated errors were, first,
src/pycurl.c:137:4: warning: #warning "libcurl was compiled with SSL
support, but configure could not determine which library was used;
thus no SSL crypto locking callbacks will be set, which may cause
random crashes on SSL requests" [-Wcpp]
then,
ImportError: pycurl: libcurl link-time ssl backend (openssl) is
different from compile-time ssl backend (none/other)
As mentioned in the PycURL docs, the solution was to "tell [PycURL's] setup.py what SSL backend is used." Setting the environment variables recommended in the output of brew info openssl, alone, did not solve the problem.
Then I found a tangentially related Github issue comment and tried the following from within my project's virtualenv:
(env)$ pip uninstall pycurl
(env)$ pip install --upgrade pip
(env)$ export LDFLAGS=-L/usr/local/opt/openssl/lib
(env)$ export CPPFLAGS=-I/usr/local/opt/openssl/include
(env)$ export PYCURL_SSL_LIBRARY=openssl
(env)$ pip install pycurl
The install command gave this output:
Collecting pycurl Using cached
https://files.pythonhosted.org/packages/e8/e4/0dbb8735407189f00b33d84122b9be52c790c7c3b25286826f4e1bdb7bde/pycurl-7.43.0.2.tar.gz
Building wheels for collected packages: pycurl Running setup.py
bdist_wheel for pycurl ... done Stored in directory:
/Users/me/Library/Caches/pip/wheels/d2/85/ae/ebf5ff0f1378a69d082b4863df492bf54c661bf6306a2bd
Successfully built pycurl
tuspy 0.2.1 has requirement pycurl==7.43.0,
but you'll have pycurl 7.43.0.2 which is incompatible. Installing
collected packages: pycurl Successfully installed pycurl-7.43.0.2
I noted the (somewhat petty?) tuspy error and trudged on. This time, my script ran without PycURL complaining.

php7 for imagecreatefromjpeg - Package 'php5-gd' has no installation candidate?

I am on php7 but I have a legacy program using:
imagecreatefromjpeg($filename)
So I tried to install:
$ sudo apt-get install php5-gd
No result:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package php5-gd is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'php5-gd' has no installation candidate
What should I install then instead for php7?
Or better, what should I replace imagecreatefromjpeg with?
Any ideas?
I have enabled extension=php_gd2.dll in my php.ini.
But I still get this error:
Uncaught Error: Call to undefined function imagecreatefromjpeg() in
/var/w
According to PHP.nethttp://php.net/manual/en/image.installation.php#120116
sudo apt-get install php7.0-gd

Apache 2.4.7 mod-mono won't install ubuntu 14.04

Recently reinstalled my computer with Ubuntu 14.04.
This pc is to be used to develop ASP.NET mono applications.
So I installed the latest 3.12.0 version of Mono.
Also installed Apache2 (2.4.7 is the latest).
Last thing is to install Mod_Mono. This is where it fails.
sudo apt-get install libapache2-mod-mono
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:
libapache2-mod-mono : Depends: apache2.2-common but it is not installable
E: Unable to correct problems, you have held broken packages.
So I tried to install apache2.2-common but that does not exist, there is only a apache2.2-bin. I installed that and it still did not solve my problem.
sudo apt-get install apache2.2-common
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package apache2.2-common is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
apache2-bin:i386 apache2:i386 apache2-data apache2-bin apache2
E: Package 'apache2.2-common' has no installation candidate
Any suggestions to what I can do so I can host my Mono application through apache2?
Solved this issue by installing Apache 2.2.22.
Had a bit of trouble doing that, but finally installed it running this command.
sudo apt-get install apache2=2.2.22-1ubuntu1.7 apache2.2-common=2.2.22-1ubuntu1.7 apache2.2-bin=2.2.22-1ubuntu1.7 apache2-mpm-worker=2.2.22-1ubuntu1.7
Note: you need to add the precise repository to your software sources, else you won't have the package available to install.