Reputation: 394
I am trying to install some PHP packages that I use for my application in Alpine Linux. The packages that I am currently using come from the Remi repo and I install them successfully on CentOS 7, but when I try to install tthe same packages on Alpine, it says not found. An example of a package is php-cli
.
Am I doing it right or is there a recommended way of installing packages in Alpine? I am using php7 and Alpine 3.8.
Note: I am using php7-
prefix when I am installing a package in Alpine.
Thanks in advance.
Upvotes: 1
Views: 4418
Reputation: 18551
For locating packages for Alpine Linux, the Alpine package search engine is the best place to look for.
Querying for php7*
, we can see that there are indeed no matches on the main
Alpine V3.8 repository, but many matches on the community
repository: php7* package search.
For installing these packages, you'll first need to add the community
repository to your /etc/apk/repositories
file (uncomment it, if it is commented out):
http://dl-cdn.alpinelinux.org/alpine/v3.8/community
Then, run apk update
and apk add php7 [additional packages...]
for installing the desired PHP 7 packages.
Specifically, php7-cli
seems to be missing. For PHP 7 CLI tools, you could try installing php7-dev
from the edge
community repository. Similar to above, add the following to your /etc/apk/repositories
, then update and install:
http://dl-cdn.alpinelinux.org/alpine/edge/community
Upvotes: 2