title: libavdevice.so.57: failed to map segment from shared object: Permission denied"
body: <p>I have successfully installed ffmpeg ver. 4.4.7 on centos, with shared enabled as such : </p>
  
  <pre><code>[root@localhost ~]# ffmpeg
  ffmpeg version N-81555-g496d97f Copyright (c) 2000-2016 the FFmpeg developers
    built with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-17)
    configuration: --prefix=/usr/local/ffmpeg_build --extra-cflags=-I/usr/local/ffmpeg_build/include --extra-ldflags=-L/usr/local/ffmpeg_build/lib --bindir=/usr/local/bin --pkg-config-flags=--static --enable-gpl --enable-nonfree --enable-libfdk-aac --enable-libx264 --enable-libx265 --enable-shared
    libavutil      55. 29.100 / 55. 29.100
    libavcodec     57. 54.102 / 57. 54.102
    libavformat    57. 48.102 / 57. 48.102
    libavdevice    57.  0.102 / 57.  0.102
    libavfilter     6. 60.100 /  6. 60.100
    libswscale      4.  1.100 /  4.  1.100
    libswresample   2.  1.100 /  2.  1.100
    libpostproc    54.  0.100 / 54.  0.100
  Hyper fast Audio and Video encoder
  usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...
  </code></pre>
  
  <p>However, when I run in php, through exec I get </p>
  
  <blockquote>
    <p>"/usr/local/bin/ffmpeg: error while loading shared libraries:
    libavdevice.so.57: failed to map segment from shared object:
    Permission denied"</p>
  </blockquote>
  
  <p>I know the web server executes the command as user 'apache' and not root, but I installed ffmpeg in /usr/local/ffmpeg_build for that specific reason, so that the regular users can use ffmpeg. </p>
  
  <p>What did I miss? What does this error mean?</p>