1- first, run it again again and delete everything that you did: (copy and right-click to paste into the terminal)
rm -rf ~/ffmpeg_build ~/ffmpeg_sources ~/bin/{ffmpeg,ffprobe,ffplay,ffserver,vsyasm,x264,x265,yasm,ytasm} sudo apt-get autoremove autoconf automake build-essential cmake libass-dev libfreetype6-dev \ libmp3lame-dev libopus-dev libsdl1.2-dev libtheora-dev libtool libva-dev libvdpau-dev \ libvorbis-dev libvpx-dev libx264-dev libxcb1-dev libxcb-shm0-dev ibxcb-xfixes0-dev mercurial texinfo zlib1g-dev sed -i '/ffmpeg_build/c\' ~/.manpath hash -r
2- now update your server:
sudo apt-get update
3- install the build tools for your server to build ffmpeg:
sudo apt-get install build-essential
4- now follow the instructions in this link
source share