Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

410
Visualizações
GLIBCXX_3.4.9 not found when running ffmpeg from php in lampp server

I've written a php program which creates a video from sequence of images using ffmpeg.

<?php
    $res = shell_exec("ffmpeg -framerate 50 -i image/image%d.png -c:v libx264 -r 30 -pix_fmt yuv420p out.mp4 2>&1");
    echo "$res";

When I run it,

it says GLIBCXX_3.4.15 , GLIBCXX_3.4.9 , GLIBCXX_3.4.11 not found.

ffmpeg: /opt/lampp/lib/libstdc++.so.6: version `GLIBCXX_3.4.15' not

found (required by /usr/lib/i386-linux-gnu/libjack.so.0) ffmpeg:

/opt/lampp/lib/libstdc++.so.6: version `GLIBCXX_3.4.9' not found

(required by /usr/lib/i386-linux-gnu/libzmq.so.3) ffmpeg:

/opt/lampp/lib/libstdc++.so.6: version `GLIBCXX_3.4.11' not found

(required by /usr/lib/i386-linux-gnu/libopencv_core.so.2.4) ffmpeg:

/opt/lampp/lib/libstdc++.so.6: version `GLIBCXX_3.4.9' not found

(required by /usr/lib/i386-linux-gnu/libopencv_core.so.2.4)

But from the terminal, ffmpeg -framerate 50 -i image/image%d.png -c:v libx264 -r 30 -pix_fmt yuv420p out.mp4 command works fine. Why php can't find the libraries while from the terminal it works fine? and what should I do to fix the problem in php? Thanks in advance.

over 4 years ago · Santiago Trujillo
2 Respostas
Responde à pergunta

0

I also had similar problem running ffmpeg command from PHP script. I found the solution by running the following command from the terminal. I'm pasting that command here so someone can get help on this.

 sudo mv /opt/lampp/lib/libstdc++.so.6 /opt/lampp/lib/libstdc++.so.6.orig

Now just run your php script hope it works.

over 4 years ago · Santiago Trujillo Relatório

0

If you have tried all the above methods (rename to .orig/_old, copy newer version to lib folder, change LD_LIBRARY_PATH in xampp),

but still couldn't solve this problem. Try this trick it worked for me finally:

1. add the following line in your PHP file.

 var_dump(shell_exec("whoami"));

you can find the username in your browser after clicking on the URL related to your PHP file

2.in your terminal

 sudo vim /ect/sudoers #in vim editor, add this line in your sudoers file "username ALL=(ALL) NOPASSWD:ALL" #change username to that found in step one

3. change the exec cmd in your PHP file to

 exec("sudo python3 urfilename.py")

The main reason for your problem might be root permission, so changing your sudoers file might fix the error.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda