public
Last active

Shell script to install and setup Autodesk Maya 2014 on Ubuntu 13.04

  • Download Gist
mayaOnUbuntu.sh
Shell
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142
#!/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

I get errors " sudo for i in $INSTALLDIR/.rpm; do sudo alien -cv $i; done" and here
" sudo dpkg -i $INSTALLDIR/
.deb "
Inavalid do command and no such directory/file ...

how to use already downloaded file instead of those http links ?
can you modified it and post it again with local drive adress ?

@harsh888 if you have it downloaded in the proper place, just comment out the wget section of the script, and it will use what you have instead of trying to re-download it.

@insomniacUNDERSCORElemon can you describe me exact words to put in that line...i am not good at scripting things......thank you so much man :)

@InsomniacUNDERSCORElemon hi.. can i make request ?
can you make a shell script to put manual link for already downloaded folder link ?
so i can also install it offline.....hope you can do that for me and others....it would be better if you use it for most stable version like 2011 of Maya.....or the newest version of Maya 2014...
thank you :)

Thanks alot, this fixed my libtiff.so.5 problem with my existing copy of maya, now if i can figure out to license the darn thing already got a license file just gotta figure out how to get it from windows to linux (/ntfs/adlm/licefile.lic) Apparently libtiff.so.5 was linked to the 32-bit one and not the 64-bit one, easily overlooked so thanks..
I think i just point my MAYA_ALT_EN to the licfile.lic, am I right on this?? any replies would be helpful...

Thank you so much for this script!

However, the line 53 is incorrect as it should be "$MAYAINSTALL" instead of "MAYAINSTALL" (adding the $), and as stated by gamelifedong, the first sudo has to be removed line 68. Hence, I installed it in several steps by commenting/uncommenting lines in the script, which has ended up with a corrupt installation (trying to launch maya displayed a license error). Uninstalling everything and launching the corrected script worked like a charm.

hi. thank you for your advices.
i try to install maya 2011 with the same script. it was installed well but at last i get this error.

I get error "usr/autodesk/maya2011-x64/bin/maya.bin: error while loading shared libraries: libtiff.so.3: cannot open shared object file: No such file or directory"

i try to sylink but it is not working.

do you have any solution for this ?

Thank you :)
cheers. Harsh

Oh my god. This is fantastic! It's not perfect, but it's still super helpful.

So I updated it for Maya 2014 SP1 for Ubuntu 13.04... I added an if statement to check for an existing download within the Maya install directory. Thanks for pointing out some issues with the original... I never tested it because I didn't think they would be much interest.

I'll start to polish this one up in the coming weeks... maybe put a version selector or something.

hay hi i used this script but ran into some problems
1.)Registration succeeded.
/usr/lib/x86_64-linux-gnu/libssl.so.10 not found. Using Autodesk’s libssl
/usr/lib/x86_64-linux-gnu/libcrypto.so.10 not found. Using Autodesk’s libssl
Installation Complete.

then after trying to run it it got
/usr/autodesk/maya2014-x64/bin/maya.bin: error while loading shared libraries: libtiff.so.3: cannot open shared object file: No such file or directory

i am a noob and begging for some help or duide to where i can get some help

Awesome! Finally got maya on my linux box (not sure why they don't have an option for the student version on linux on their website). Thanks for the script.

an interesting script using Debian : http://etoia.free.fr/?p=1611 with alternative to alien, RPM tricks using setup command. Don't know if it work on Debian Wheezy + Maya 2014.

The installation runs succesfully, but when i try to run maya:

~ $ sudo LIBGL_DEBUG=verbose maya

libGL: screen 0 does not appear to be DRI2 capable
libGL: OpenDriver: trying /usr/lib/x86_64-linux-gnu/dri/tls/swrast_dri.so
libGL: OpenDriver: trying /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
libGL error: failed to load driver: swrast

maya encountered a fatal error

Signal: 11 (Unknown Signal)
Fatal Error. Attempting to save in /usr/tmp/root.20140113.1639.ma
Segmentation fault

But when I boot in softwer rendering mode, it works. Any idea?

Is there an error log that can tell me why Maya doesn't start up? I ran the 2014/Ubuntu 12.04 fork of this script: https://gist.github.com/insomniacUNDERSCORElemon/5555214

What I get is that maya.bin runs but no window comes up. Looking at Monitor, maya.bin starts at 50% cpu utilization, then goes to a steady 8%. No windows pop up at any time, no errors in the terminal. Does Maya have an error log that reveals what went wrong? (I'm running Ubuntu 12.04 on a Dell 1545; the install script ran all the way through).

UPDATE: running Heith's current script (2014-01-26), intended for Ubuntu 13.04, successfully installed Maya 2014 on my Ubuntu 12.04 Heith, you are god, and your wife is hot. Thank you!

Silly question, I want to remove maya. How do I go about this? Just grep and delete all directories?

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

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.