mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 04:44:53 +08:00
add linux-header installer for alpine
This commit is contained in:
parent
0afc8ea2c3
commit
7408781d13
@ -50,6 +50,19 @@ class LinuxToolCheckList
|
|||||||
return CheckResult::ok();
|
return CheckResult::ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[AsCheckItem('if necessary packages are installed', limit_os: 'Linux')]
|
||||||
|
public function checkSystemOSPackages(): ?CheckResult
|
||||||
|
{
|
||||||
|
$distro = SystemUtil::getOSRelease();
|
||||||
|
if ($distro['dist'] === 'alpine') {
|
||||||
|
// check linux-headers installation
|
||||||
|
if (!file_exists('/usr/include/linux/mman.h')) {
|
||||||
|
return CheckResult::fail('linux-headers not installed on your system', 'install-linux-tools', ['alpine', ['linux-headers']]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return CheckResult::ok();
|
||||||
|
}
|
||||||
|
|
||||||
#[AsFixItem('install-linux-tools')]
|
#[AsFixItem('install-linux-tools')]
|
||||||
public function fixBuildTools(array $distro, array $missing): bool
|
public function fixBuildTools(array $distro, array $missing): bool
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user