I am at the initial stages of preparing for multiphp nginx following a complete install of Ubuntu and the git page
http://phpbrew.github.io/phpbrew/
I have duplicated steps followed here for clarity and re-installed Ubuntu and followed exactly what is below in case my error correction attempts were causing issues
https://docs.google.com/spreadsheets/d/1KbfqW5PqFejlCMV9yEUHgEr5FdCh5P6Ufv-HRQH3u9g/edit?usp=sharing
but fails with /usr/bin/env: php: No such file or directory.
Please check out our wiki and install the requirements
https://github.com/phpbrew/phpbrew/wiki/Requirement
apt-get build-dep php5
apt-get install -y php5 php5-dev php-pear autoconf automake curl libcurl3-openssl-dev build-essential libxslt1-dev re2c libxml2 libxml2-dev php5-cli bison libbz2-dev libreadline-dev
apt-get install -y libfreetype6 libfreetype6-dev libpng12-0 libpng12-dev libjpeg-dev libjpeg8-dev libjpeg8 libgd-dev libgd3 libxpm4 libltdl7 libltdl-dev
apt-get install -y libssl-dev openssl
apt-get install -y gettext libgettextpo-dev libgettextpo0
apt-get install -y libicu-dev
apt-get install -y libmhash-dev libmhash2
apt-get install -y libmcrypt-dev libmcrypt4
I did not post this without much effort trying to resolve first - about a day and many visited links.
Anyway the issue lay with thinking php was installed with Ubuntu +/ updates.
Note that phpbrew has php as one of its dependencies.
I guess a fresh OS install went against me on this occasion.
sudo apt-get install php5
Related
I am using Linux Mint 19.1. My PHP configuration is like below
I am getting below error while I am trying to install mcrypt.
Try out using these commands
To install the dependencies :
sudo apt-get -y install gcc make autoconf libc-dev pkg-config
sudo apt-get -y install php7.2-dev
sudo apt-get -y install libmcrypt-dev
Once the dependencies have been installed, you can install mcrypt with the command:
sudo pecl install mcrypt-1.0.1
I have a PHP-CLI Docker image of Debian Buster and would like to install php-imagick package but with command:
Dockerfile:
RUN apt-get install -y php-imagick
I get an error:
Package php-imagick 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 'php-imagick' has no installation candidate
running before:
RUN apt-get update -y && apt-get upgrade -y
did not help.
how come there is no package candidate for php-imagick?
how to install and enable imagick extension for this PHP Docker image?
Dockerfile to replicate issue:
FROM php:7.3-buster
RUN apt-get update -y && apt-get upgrade -y
RUN apt-get install -y php-imagick
build command
docker build --tag testimage .
Unless you have a good reason not to, using the packages from https://deb.sury.org/ is probably a good idea. The following appears to work:
FROM debian:buster-slim
USER root
# Get Debian up-to-date
RUN apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y git \
mariadb-client wget curl \
ca-certificates lsb-release apt-transport-https gnupg bsdmainutils
RUN echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | tee -a /etc/apt/sources.list.d/php.list \
&& curl https://packages.sury.org/php/apt.gpg | apt-key add - \
&& apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y php7.3 php7.3-common php7.3-cli \
php7.3-mysql php7.3-curl php7.3-xml php7.3-mbstring \
php7.3-intl php7.3-redis php7.3-zip \
php7.3-imagick supervisor
I am trying to install new laravel app on my machine but i am getting errors during installation.I am attaching the image files that shows the errors that i am getting. I am using ubuntu 14.04
This is my typical list of "extras" for a ubuntu install. Your requirements may differ:
apt-get install -y fish
apt-get install -y zip
apt-get install -y sqlite
apt-get install -y php-mbstring
apt-get install -y php-curl
apt-get install -y php-dom
You have a missing requirement php5.6-mbstring.
It has already been answered over here but for php7.0:
https://askubuntu.com/a/731380/588546
You could install it using the apt get method.
If you are using php5 use:
apt-get install php5-mbstring
If you are using php5.6 (as i could see you are using it) use:
apt-get install php5.6-mbstring
If you are using php7.0 use:
apt-get install php7.0-mbstring
There might be some other missing dependencies too.
Hope it helps.
I am trying to install php7.0-pgsql, but always get
E: Unable to locate package phpXXX-pgsql
I am trying
apt-get update
apt-get install php7.0-pgsql=7.0.12-1+deb
or
apt-get install php7.0-pgsql=7.0.12-1
or
apt-get install php7.0-pgsql
or even
apt-get install php-pgsql
always with the same result. Anyone can help me please?
echo "deb http://ftp.de.debian.org/debian stretch main" >> /etc/apt/sources.list
apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y php7.0-pgsql
I have a Dockerfile in which to build a container for php-fpm. I pulled in my base ubuntu image and it gets to work but then exits when trying to install php-fpm and php5-intl due to unmet dependencies.
Can anyone check over my file and spot anything obvious please :)
FROM phalcon/ubuntu
MAINTAINER bob <bob#bob.com>
RUN echo "deb http://archive.ubuntu.com/ubuntu/ vivid universe" >> /etc/apt/sources.list
# Install software requirements
RUN apt-get update && \
apt-get install -y software-properties-common && \
add-apt-repository -y ppa:ondrej/php5 && \
add-apt-repository -y ppa:nginx/stable && \
apt-get update -y --force-yes && \
apt-get upgrade -y --force-yes && \
BUILD_PACKAGES="supervisor php5-fpm git php5-mysql php5-curl php5-gd php5-intl php5-mcrypt php5-memcache php5-sqlite php5-tidy php5-xmlrpc php5-xsl php5-pgsql php5-mongo php5-dev pwgen" && \
apt-get -y --force-yes install $BUILD_PACKAGES && \
apt-get remove --purge -y software-properties-common && \
apt-get autoremove -y && \
apt-get clean && \
apt-get autoclean
# Add PHP config.
ADD php-fpm.conf /etc/php-fpm.conf
# Define mountable directories.
VOLUME ["/etc/php-fpm.d", "/var/log/php-fpm", "/srv/http"]
# Define entrypoint.
ENTRYPOINT ["php-fpm"]
# Expose ports.
EXPOSE 9000
Probably some issue regarding the use of the source image phalcon/ubuntu from what I can see.
There's actually no reason to build your own PHP-FPM image, as official ones are supplied: https://hub.docker.com/_/php/ This way you can select the exact PHP version you want to use.
Just for kicks, here is the repository from which the image is built (PHP 5.6): https://github.com/docker-library/php/tree/master/5.6/fpm