Skip to content

Instantly share code, notes, and snippets.

@heiths
Last active February 28, 2024 18:50
Show Gist options
  • Star 40 You must be signed in to star a gist
  • Fork 19 You must be signed in to fork a gist
  • Save heiths/3250500 to your computer and use it in GitHub Desktop.
Save heiths/3250500 to your computer and use it in GitHub Desktop.
Shell script to install and setup Autodesk Maya 2014 on Ubuntu 13.04
#!/bin/bash
#Heith Seewald 2012
#Feel free to extend/modify to meet your needs.
#Maya on Ubuntu v.1
#This is the base installer... I’ll add more features in later versions.
#if you have any issues, feel free email me at heiths@gmail.com
#### Lets run a few checks to make sure things work as expected.
#Make sure we’re running with root permissions.
if [ `whoami` != root ]; then
echo Please run this script using sudo
echo Just type “sudo !!”
exit
fi
#Check for 64-bit arch
if [uname -m != x86_64]; then
echo Maya will only run on 64-bit linux.
echo Please install the 64-bit ubuntu and try again.
exit
fi
#Setup a few vars
export MAYAINSTALL='mayaTempInstall'
export INSTALLFILE="Autodesk_Maya_2014_SP1_English_Linux_64bit.tgz"
export RPM_INSTALL_PREFIX=/usr
export LD_LIBRARY_PATH=/opt/Autodesk/Adlm/R7/lib64/
LIBCRYPTO="/usr/lib/x86_64-linux-gnu/libcrypto.so.0.9.8"
LIBSSL="/usr/lib/x86_64-linux-gnu/libssl.so.0.9.8"
MAYAURL="http://download.autodesk.com/us/maya/service_packs/Autodesk_Maya_2014_SP1_English_Linux_64bit.tgz"
PRODUCTID="657F1"
#Install Message
echo "You’re about to download and install Autodesk Maya 2014"
echo ""
echo "Do you wish to continue [Y/n]?"
read RESPONSE
case "$RESPONSE" in
n*|N*)
echo "Install Terminated"
exit 0;
esac
#Get serial number
echo "If you have not already done so, you can get your serial number from: http://students.autodesk.com"
echo "Enter the serial number"
read SERIALNUMBER
echo ""
#Create a temp folder for the install files
if [ ! -d "$HOME/$MAYAINSTALL" ]; then
mkdir $HOME/$MAYAINSTALL
echo "Creating $MAYAINSTALL folder"
echo ""
fi
export INSTALLDIR=$HOME/$MAYAINSTALL
cd $INSTALLDIR
sudo chmod -R 777 $INSTALLDIR
#Now check to see if you already have maya downloaded and in the install folder.
if [ -f $INSTALLDIR/$INSTALLFILE ]; then
#Make sure the install file is complete.
MAYA_INSTALL_HASH=$(md5sum -b $INSTALLDIR/$INSTALLFILE | awk '{print $1}')
if [ "$MAYA_INSTALL_HASH" = "c4f709095760803d19e413093d7d5ab7" ]; then
echo "Maya install file found and verified... skipping download"
else
echo "Maya file found, but it's not complete. We'll try the download again"
mv $INSTALLFILE $INSTALLFILE.bak
wget --referer="http://trial.autodesk.com" --content-disposition $MAYAURL
fi
else
echo "Maya install file not found. We'll download it now."
wget --referer="http://trial.autodesk.com" --content-disposition $MAYAURL
fi
# Install Dependencies
sudo apt-get install csh tcsh libaudiofile-dev libglw1-mesa elfutils gamin libglw1-mesa-dev mesa-utils xfs xfstt ttf-liberation ttf-mscorefonts-installer xfonts-100dpi xfonts-75dpi alien
sleep 3s
# Extract Maya Install Files
tar xvf $INSTALLDIR/$INSTALLFILE
# Convert rpms to debs
for i in $INSTALLDIR/*.rpm; do sudo alien -cv $i; done
sleep 2s
#install the debs
sudo dpkg -i $INSTALLDIR/*.deb
#Setup For Mental Ray.
sudo mkdir /usr/tmp
sudo chmod 777 /usr/tmp
#Required for license to install
sudo cp libadlmPIT.so.7 /usr/lib/libadlmPIT.so.7
sudo cp libadlmutil.so.7 /usr/lib/libadlmutil.so.7
# License Setup:
sudo echo -e 'MAYA_LICENSE=unlimited\nMAYA_LICENSE_METHOD=standalone' > /usr/autodesk/maya2014-x64/bin/License.env
#Notice the lack of sudo.
/usr/autodesk/maya2014-x64/bin/adlmreg -i S $PRODUCTID $PRODUCTID 2014.0.0.F $SERIALNUMBER /var/opt/Autodesk/Adlm/Maya2014/MayaConfig.pit
# symbolic links:
# Its preferred to use the libssl and libcrypto that’s included with your system... so we’ll try that first.
# We’ll use the files included by autodesk as a fallback
#Libssl Link
if [ -f "$LIBSSL" ]
then
echo "$LIBSSL found. Using it."
ln -s $LIBSSL /usr/autodesk/maya2014-x64/lib/libssl.so.10
else
echo "$LIBSSL not found. Using Autodesk’s libssl"
sudo ln -s /usr/autodesk/maya2014-x64/support/openssl/libssl.so.6 /usr/autodesk/maya2014-x64/lib/libssl.so.10
fi
#LibCrypto Link
if [ -f "$LIBCRYPTO" ]
then
echo "$LIBCRYPTO found. Using it."
ln -s $LIBCRYPTO /usr/autodesk/maya2014-x64/lib/libcrypto.so.10
else
echo "$LIBCRYPTO not found. Using Autodesk’s libssl"
sudo ln -s /usr/autodesk/maya2014-x64/support/openssl/libcrypto.so.6 /usr/autodesk/maya2014-x64/lib/libcrypto.so.10
fi
# libtiff
sudo ln -s /usr/lib/x86_64-linux-gnu/libtiff.so.5.1.0 /usr/lib/libtiff.so.3
sleep 2s
#Everything should work now...
echo "Installation Complete."
echo ""
echo "Start Maya Now?"
read RUNNOW
case "$RUNNOW" in
n*|N*)
echo "You can run maya any time by typing maya into the terminal"
exit 0;
esac
maya
@Punkster
Copy link

Punkster commented Mar 2, 2014

Is there a script already available for 13.10? I'm dying to get it. Thanks.

@hadnet1
Copy link

hadnet1 commented May 4, 2014

I tried to run this script under Ubuntu 14.04 and installed it without evident error, but when ask me "start Maya now ?", just it says " ./mayaOnUbuntu.sh: /usr/local/bin/maya: /bin/csh: bad interpreter: No such file or directory". What is wrong ?

@conceptrat
Copy link

You most likely need to install it. Use "tcsh" instead using "sudo apt-get install tcsh". I'm surprised that it isn't already installed on your system as I'm pretty sure it was installed by default on my installation of Ubuntu 14.04.

Actually just noticed that in the script above it actually does the install of "tcsh".

# Install Dependencies
sudo apt-get install csh tcsh libaudiofile-dev libglw1-mesa elfutils gamin libglw1-mesa-dev mesa-utils xfs xfstt ttf-liberation ttf-mscorefonts-installer xfonts-100dpi xfonts-75dpi alien
sleep 3s

@lmmx
Copy link

lmmx commented Feb 2, 2015

If xfs won't install (Package 'xfs' has no installation candidate) you need to add the saucy repo:

echo 'deb http://archive.ubuntu.com/ubuntu saucy main universe' >> /etc/apt/sources.list.d/extra.list
apt-get update

@Era-Dorta
Copy link

I have updated the above script to work with Maya 2015 SP5 and Ubuntu 14.04
https://gist.github.com/Garoe/859324436d1273aa56ff
Notice that there are a few commands to run after the script have finished and they are at the bottom of the gist

@z3ntu
Copy link

z3ntu commented Dec 8, 2015

If anyone wants a version for Maya 2016 SP4, I have it here: https://gist.github.com/z3ntu/8ed3fd920ebd8651dd87

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment