Skip to content

Instantly share code, notes, and snippets.

@stenstorp
Forked from MichaelLawton/gist:ee27bf4a0f591bed19ac
Last active December 8, 2022 06:37
Show Gist options
  • Save stenstorp/96960fbe203caf74d4ca to your computer and use it in GitHub Desktop.
Save stenstorp/96960fbe203caf74d4ca to your computer and use it in GitHub Desktop.
Installing Maya 2016 SP6 on Ubuntu 16.04 with Student License
#!/bin/bash
#Download Maya from here: http://download.autodesk.com/us/support/files/maya_2016_service_pack_6/Autodesk_Maya_2016_SP6_EN_Linux_64bit.tgz
#Get a student License from: http://www.autodesk.com/education/free-software/maya
#Log in and select maya 2016, your language and an OS. Either should work.
# !!!!!! IMPORTANT !!!!!!
# BEFORE RUNNING, REPLACE "USER" AND "HOME" AT THE BOTTOM OF THIS SCRIPT WITH YOUR USERNAME AND HOME FOLDER
# !!!!!! IMPORTANT !!!!!!
if [ "$(id -u)" != "0" ]; then
echo "Please run as root or via sudo."
exit 1
fi
mkdir maya2016_setup
mv Autodesk_Maya_2016_SP6_EN_Linux_64bit.tgz maya2016_setup/
cd maya2016_setup
echo "Extracting files..."
tar xf Autodesk_Maya_2016_SP6_EN_Linux_64bit.tgz
export RPM_INSTALL_PREFIX=/usr
export LD_LIBRARY_PATH=/opt/Autodesk/Adlm/R11/lib64/
export LIBCRYPTO="/lib/x86_64-linux-gnu/libcrypto.so.1.0.0"
export LIBSSL="/lib/x86_64-linux-gnu/libssl.so.1.0.0"
echo "Installing dependencies..."
apt install -qq libssl-dev libjpeg62 alien csh tcsh libaudiofile-dev libglw1-mesa elfutils libglw1-mesa-dev mesa-utils xfstt ttf-liberation xfonts-100dpi xfonts-75dpi ttf-mscorefonts-installer libfam0 libfam-dev libgstreamer-plugins-base0.10-0
wget http://mirrors.kernel.org/ubuntu/pool/main/libx/libxp/libxp6_1.0.2-1ubuntu1_amd64.deb
ar x libxp6_1.0.2-1ubuntu1_amd64.deb
tar xf data.tar.xz
echo "Turning rpms into debs. This may take a while"
for i in *.rpm; do
alien -c $i;
done
echo "Installing debs"
dpkg -i *.deb
mkdir /usr/tmp
chmod 777 /usr/tmp
xset +fp /usr/share/fonts/X11/100dpi/
xset +fp /usr/share/fonts/X11/75dpi/
cp usr/lib/x86_64-linux-gnu/libXp.so.6 /usr/autodesk/maya2016/lib/
cp /usr/lib/x86_64-linux-gnu/libcrypto.so /usr/autodesk/maya2016/lib/libcrypto.so.10
cp /usr/lib/x86_64-linux-gnu/libssl.so /usr/autodesk/maya2016/lib/libssl.so.10
cp /usr/lib/x86_64-linux-gnu/libtiff.so.5.2.4 /usr/autodesk/maya2016/lib/libtiff.so.3
cp /usr/lib/x86_64-linux-gnu/libjpeg.so.62 /usr/autodesk/maya2016/lib/libjpeg.so.62
rm /usr/lib/libfam.so.0
ln -s /usr/lib/libfam.so.0.0.0 /usr/lib/libfam.so.0
sh -c "echo 'setenv LC_ALL en_US.UTF-8' >> /usr/autodesk/maya2016/bin/maya2016"
export MAYA_LOCATION=/usr/autodesk/maya2016/
echo "Making sure Maya can't use rpm"
echo "int main (void) {return 0;}" > notrpm.c
gcc notrpm.c -o notrpm
mv /usr/bin/rpm /usr/bin/rpm_backup
cp notrpm /usr/bin/rpm
chmod +x ./setup
./setup
rm /usr/bin/rpm
mv /usr/bin/rpm_backup /usr/bin/rpm
gsettings set org.gnome.desktop.wm.preferences mouse-button-modifier "<Super>"
echo "Making sure Maya will run"
sed -n '/LIBQUICKTIME_PLUGIN_DIR/ i setenv LD_PRELOAD /usr/lib/x86_64-linux-gnu/libjpeg.so.62' /usr/autodesk/maya2016/bin/maya
sed -i '/Exec/c\Exec=xterm -e \"export MAYA_DISABLE_CIP=1 && maya\"' /usr/autodesk/maya2016/desktop/Autodesk-Maya.desktop
rm /usr/share/applications/Autodesk-Maya2016.desktop
cp /usr/autodesk/maya2016/desktop/Autodesk-Maya.desktop /usr/share/applications/Autodesk-Maya2016.desktop
maya
echo "repairing permissions..."
chown -R USER HOME
mv Autodesk_Maya_2016_SP6_EN_Linux_64bit.tgz ..
cd ..
rm -rf maya2016_setup
echo "Maya is now ready to use!"
echo "To disable the shortcuts overlay when holding the super key,"
echo "install compizconfig-settings-manager using:"
echo "sudo apt install compizconfig-settings-manager"
echo "Run ccsm and go to Ubuntu unity plugin and disable"
echo "Enable Shortcut Hints Overlay"
@heaven00
Copy link

Thanks this made my life easier, I installed SP3 using this 👍
The process is still running but its running nicely so far :)

@erichhasl
Copy link

Thank you for this script, but I have a problem: Maya is not working properly. The default viewport is just white and it says "Singular Matrix: No inverse exists". And the items from the shelves are disapearing all the time, another problem is that it says "Missing Cg implementation"? Do you have an idea how to fix that?

Copy link

ghost commented Feb 9, 2016

How much time take the whole installation because I still stuck on the part where we convert maya.rpm to maya.deb it is normal that it takes a bit?

@aytackanaci
Copy link

Hi

I'm getting this error when running:

Stack trace:
  /lib/x86_64-linux-gnu/libc.so.6(+0x352f0) [0x7f67396622f0]
  OGS::Devices::GL3FunctionTable::populate()
  OGS::Devices::GL3Context::PopulateFunctionTable(OGS::Devices::ACreationParameters const*)
  OGS::Devices::VirtualDeviceGL3::CreateDevice(OGS::Devices::ACreationParameters const*)
  OGS::Devices::Sys::CreateVirtualDevice(OGS::Devices::ACreationParameters*)
  OGSRenderer::initializeOGSDevice(OGS::Objects::UString*, int)
  OGSMayaRenderer::initialize(OGSRenderer::DeviceAPI, int, void*, void*, void*, bool)
  OGSMayaBridge::CreateOGSRenderer()
  OGSMayaBaseRenderer::initialize()
  OGSViewportRenderer::initialize()
  OGSMayaBridge::Create3DViewportRenderer()
  /usr/autodesk/maya2016/bin/maya.bin() [0x41740b]
  Tapplication::start()
  /usr/autodesk/maya2016/bin/maya.bin() [0x40e8af]
  main
  __libc_start_main
  /usr/autodesk/maya2016/bin/maya.bin() [0x40e06d]

Any ideas?

@qenops
Copy link

qenops commented Apr 28, 2016

Also having the same problem as aytackanaci. According to http://forums.autodesk.com/t5/maya-general/may2016-on-linux-opengl-error/td-p/5783041, its a problem with the OpenGL libraries in the Nvidia driver, but the solution suggested didn't work because the links were already there.

I have a GTX Titan

I'm using NVIDIA-352 driver as can be seen here:
$ dpkg -l | grep nvidia
ii nvidia-352 352.79-0ubuntu1 amd64 NVIDIA binary driver - version 352.79
ii nvidia-352-dev 352.79-0ubuntu1 amd64 NVIDIA binary Xorg driver development files
ii nvidia-352-uvm 352.79-0ubuntu1 amd64 Transitional package for nvidia-352
ii nvidia-modprobe 352.79-0ubuntu1 amd64 Load the NVIDIA kernel driver and create device files
ii nvidia-opencl-icd-352 352.79-0ubuntu1 amd64 NVIDIA OpenCL ICD
ii nvidia-prime 0.6.2 amd64 Tools to enable NVIDIA's Prime
ii nvidia-settings 352.79-0ubuntu1 amd64 Tool for configuring the NVIDIA graphics driver

Any help is appreciated!

@JackDavidson
Copy link

JackDavidson commented May 3, 2016

Hi,

When I finally get to launching Maya, I am getting a segfault:

terminate called after throwing an instance of 'std::logic_error'
  what():  basic_string::_S_construct null not valid
Stack trace:
  /lib/x86_64-linux-gnu/libc.so.6(+0x354a0) [0x7fca7c01d4a0]
  gsignal
  abort
  __gnu_cxx::__verbose_terminate_handler()
  /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0x8d6b6) [0x7fca7cacc6b6]
  /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0x8d701) [0x7fca7cacc701]
  /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0x8d919) [0x7fca7cacc919]
  std::__throw_logic_error(char const*)
  char* std::string::_S_construct<char const*>(char const*, char const*, std::allocator<char> const&, std::forward_iterator_tag)
  std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&)
  /usr/autodesk/maya2016/lib/libMC3.so.8(+0xb7330) [0x7fca7ae93330]
  /usr/autodesk/maya2016/lib/libMC3.so.8(+0x139c7f) [0x7fca7af15c7f]
  /usr/autodesk/maya2016/lib/libMC3.so.8(+0xb7f69) [0x7fca7ae93f69]
  CMLFacade::Initialize(CMLWaypoint*, wchar_t const*, wchar_t const*, wchar_t const*, int, unsigned int, long long, long long, MC3_MODE, wchar_t const*)
  TCIPClient::initialize()
  TCIPClient::TCIPClient()
  TCIPClient::theOne()
  TbaseApp::cipReportStartup()
  TbaseApp::initGeneral()
  /usr/autodesk/maya2016/bin/maya.bin() [0x415a52]
  Tapplication::start()
  /usr/autodesk/maya2016/bin/maya.bin() [0x40e6ff]
  main
  __libc_start_main
  /usr/autodesk/maya2016/bin/maya.bin() [0x40debd]

Segmentation fault (core dumped)

I am installing on Ubuntu 16.04.
The only thing I really had to change from your script is that /usr/lib/x86_64-linux-gnu/libtiff.so.5.2.0 is now /usr/lib/x86_64-linux-gnu/libtiff.so.5.2.4

I don't know if this is useful, but when I try to run /usr/autodesk/maya2016/bin/maya.bin I get:

error while loading shared libraries: libtbbmalloc_proxy.so.2: cannot open shared object file: No such file or directory

Has anyone had or solved this issue?

edit:

/usr/autodesk/maya2016/lib/ contains all the .so files that maya couldn't seem to find. Copying them to where they could be found didn't help though. I run 'maya' or 'sudo maya' and it begins startup but then segfaults almost immediately.

/usr/autodesk/maya2016/bin/maya.bin results in:

License was not obtained

License method:
can't determine license method

Product choice:
can't determine product choice

@era269
Copy link

era269 commented Jul 4, 2016

JackDavidson:
http://forums.autodesk.com/t5/maya-general/render-crash-on-linux/td-p/5607694

A workaround until we can reproduce and know what is going on would be to disable the CIP module
export MAYA_DISABLE_CIP=1
Before running Maya

There is a NULL pointer string being used from somewhere. Whether Maya cannot find some resource
Once Maya can be run under muster having the listing of environment variables as seen by Maya would be useful to see how the setup is configured

@Animakozak
Copy link

@jpcrosado, did you make it? My seem to be a little bit stuck on this stage.

@Animakozak
Copy link

Ah, sorry, yeah:

Can take a long time - 15 to 30min

for i in *.rpm; do
sudo alien -cv $i;
done

@alfhh
Copy link

alfhh commented Sep 12, 2016

Hi! Thanks for script, it made really easy the installation of Maya, the process finished correctly and I can see the Maya application on my apps, I'm using Ubuntu 16.04, but when I click on the app, Maya opens a black window and then it closes. Any idea of a solution? Thanks in advance.

@stenstorp
Copy link
Author

@elfhh updated the script. Should work now

@Secretkeys
Copy link

JackDavidson: This should help you, "echo "MAYA_DISABLE_CIP=1" >> ~/maya/2017/Maya.env"

Link: http://lost-triangle.com/2016/09/05/install-maya-2017-on-ubuntu-16-04/

@xiximitho
Copy link

xiximitho commented Aug 7, 2017

If someone has getting the error with polygons, close your Autodesk Maya and just open the maya folder, maya > 2016 > prefs, and remove the folder "shelves" (i'd extremely recommend that you make a backup), and open your Autodesk Maya. Maybe this help you. Worked for me .

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