Commonly you may get an error like Set the TMPDIR environment variable to another directory while installing package. This same error  If you may get an error while install/configure FFMPEG package,

# ./configure

Unable to create and execute files in /tmp.  Set the TMPDIR environment
variable to another directory and make sure that it is not mounted noexec.
Sanity test failed.

If you think configure made a mistake, make sure you are using the latest
version from Git.  If the latest version fails, report the problem to the
ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "config.log" produced by configure as this will help
solve the problem.


Solution :

You need to create a tmp directory with full permission and set the tmp directory path to that particular package,

cd into software package directory,
 
# cd /your/package/path 

Create a tmp directory and full permission,
 
# mkdir tmp

#chmod 777 tmp -R

# export TMPDIR=/usr/local/src/package-2.1