Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Maya 2017 Installation on Ubuntu 16.04
#!/bin/bash
# Make sure the tgz file is in the home directory
# Original script downloaded educational version,
# whereas I need to use the full, paid-for version
# https://forums.autodesk.com/t5/installation-licensing/maya-2018-ubuntu-16-04-lts-start-up-errors/m-p/7446146
FILE=Autodesk_Maya_2017_EN_JP_ZH_Linux_64bit.tgz
if [ ! -f ~/$FILE ]; then
echo Cannot find ~/$FILE
exit
fi
## 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
## Create download directory
mkdir maya2017Install
cd maya2017Install
## Move Maya install file in from home
ln -s ~/$FILE .
tar xvf $FILE
## Install dependencies
apt-get install -y libssl1.0.0
apt-get install -y gcc
apt-get install -y libssl-dev
apt-get install -y libjpeg62
apt-get install -y alien
apt-get install -y csh
apt-get install -y tcsh
apt-get install -y libaudiofile-dev
apt-get install -y libglw1-mesa
apt-get install -y elfutils
apt-get install -y libglw1-mesa-dev
apt-get install -y mesa-utils
apt-get install -y xfstt
apt-get install -y ttf-liberation
apt-get install -y xfonts-100dpi
apt-get install -y xfonts-75dpi
apt-get install -y ttf-mscorefonts-installer
apt-get install -y libfam0
apt-get install -y libfam-dev
apt-get install -y libgstreamer-plugins-base0.10-0
wget http://launchpadlibrarian.net/183708483/libxp6_1.0.2-2_amd64.deb
## Install Maya
alien -cv *.rpm
dpkg -i *.deb
echo "int main (void) {return 0;}" > mayainstall.c
gcc mayainstall.c
mv /usr/bin/rpm /usr/bin/rpm_backup
cp a.out /usr/bin/rpm
chmod +x ./setup
./setup
rm /usr/bin/rpm
mv /usr/bin/rpm_backup /usr/bin/rpm
## Fix startup errors
# TODO: add tests around file existence/conflicts
ln -s /usr/lib/x86_64-linux-gnu/libtiff.so.5.2.4 /usr/lib/libtiff.so.3
ln -s /usr/lib/x86_64-linux-gnu/libssl.so /usr/autodesk/maya2017/lib/libssl.so.10
ln -s /usr/lib/x86_64-linux-gnu/libcrypto.so /usr/autodesk/maya2017/lib/libcrypto.so.10
# https://gist.github.com/borgfriend/b83467639cb8039dc79974bf780a4994#gistcomment-1913722
ln -s /usr/lib/nvidia-375/libGL.so /usr/autodesk/maya2017/lib/
# https://forums.autodesk.com/t5/installation-licensing/can-t-run-maya-2017-on-debian-9/td-p/6908745
ORIGFILE=/usr/autodesk/maya2017/lib/python2.7/lib-dynload/_hashlib.so
RHELFILE=/usr/autodesk/maya2017/lib/python2.7/lib-dynload/rhel_hashlib.so
if [ ! -f $RHELFILE ]; then
sudo mv $ORIGFILE $RHELFILE
sudo ln -s /usr/lib/python2.7/lib-dynload/_hashlib.x86_64-linux-gnu.so $ORIGFILE
fi
mkdir -p /usr/tmp
chmod 777 /usr/tmp
mkdir -p ~/maya/2017/
chmod 777 ~/maya/2017/
## Fix segmentation fault error
echo "MAYA_DISABLE_CIP=1" >> ~/maya/2017/Maya.env
## Fix Color Managment Errors
echo "LC_ALL=C" >> ~/maya/2017/Maya.env
chmod 777 ~/maya/2017/Maya.env
## Maya camera modifier key
gsettings set org.gnome.desktop.wm.preferences mouse-button-modifier "<Super>"
## Ensure that fonts are loaded
xset +fp /usr/share/fonts/X11/100dpi/
xset +fp /usr/share/fonts/X11/75dpi/
xset fp rehash
echo Maya was installed successfully.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment