mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-19 05:14:52 +08:00
fix musl install on rhel
This commit is contained in:
parent
f9685b82a1
commit
654c5cba0c
@ -36,13 +36,12 @@ class LinuxMuslCheck
|
|||||||
#[AsFixItem('fix-musl')]
|
#[AsFixItem('fix-musl')]
|
||||||
public function fixMusl(array $distro): bool
|
public function fixMusl(array $distro): bool
|
||||||
{
|
{
|
||||||
$rhel_install = 'dnf install tar wget git zip bison flex bzip2 cmake patch && \
|
$rhel_install = 'wget https://musl.libc.org/releases/musl-1.2.4.tar.gz && tar -zxvf musl-1.2.4.tar.gz && \
|
||||||
wget https://musl.libc.org/releases/musl-1.2.4.tar.gz && tar -zxvf musl-1.2.4.tar.gz && \
|
|
||||||
rm -f musl-1.2.4.tar.gz && cd musl-1.2.4 &&
|
rm -f musl-1.2.4.tar.gz && cd musl-1.2.4 &&
|
||||||
if [[ ! "$PATH" =~ (^|:)"/usr/local/musl/bin"(:|$) ]]; then export PATH="/usr/local/musl/bin:$PATH"
|
if [[ ! "$PATH" =~ (^|:)"/usr/local/musl/bin"(:|$) ]]; then echo "export PATH=/usr/local/musl/bin:$PATH" >> ~/.bash_profile
|
||||||
fi && \
|
fi && \
|
||||||
./configure --disable-shared --enable-wrapper=gcc && \
|
./configure --enable-wrapper=gcc && \
|
||||||
make -j && make install && cd ..';
|
make -j && make install && cd .. && rm -rf musl-1.2.4';
|
||||||
$install_cmd = match ($distro['dist']) {
|
$install_cmd = match ($distro['dist']) {
|
||||||
'ubuntu', 'debian' => 'apt-get install musl musl-tools -y',
|
'ubuntu', 'debian' => 'apt-get install musl musl-tools -y',
|
||||||
'alpine' => 'apk add musl musl-utils musl-dev',
|
'alpine' => 'apk add musl musl-utils musl-dev',
|
||||||
|
|||||||
@ -36,7 +36,7 @@ class LinuxToolCheckList
|
|||||||
'git', 'autoconf', 'automake',
|
'git', 'autoconf', 'automake',
|
||||||
'tar', 'unzip', 'gzip', 'gcc',
|
'tar', 'unzip', 'gzip', 'gcc',
|
||||||
'bzip2', 'cmake', 'patch',
|
'bzip2', 'cmake', 'patch',
|
||||||
'xz',
|
'xz', 'wget', // to get musl
|
||||||
];
|
];
|
||||||
|
|
||||||
/** @noinspection PhpUnused */
|
/** @noinspection PhpUnused */
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user