Skip to content

Instantly share code, notes, and snippets.

@aitesam961
Last active April 18, 2025 12:25
Show Gist options
  • Save aitesam961/608ec27862e942e5ae1360fd0ba2b4d2 to your computer and use it in GitHub Desktop.
Save aitesam961/608ec27862e942e5ae1360fd0ba2b4d2 to your computer and use it in GitHub Desktop.
Install Mentor Graphics Questasim 2021.2 on Ubuntu 24.04 LTS

This guide outlines the process of installing Mentor Graphics Questasim 2021.2 on Ubuntu 24.04LTS (or any modern debian distro).

*Note: This guide makes use of unofficial ways of activating license which is not recommended. If you have access, or can purchase the official license from Siemens, would be the best way. Otherwise, if you are an individual who plans to use it for non commercial use and or for learning purposes, you are more than welcome to follow.

Installing dependecies

sudo apt install libxft2 libxft2:i386 lib32ncurses6
sudo apt install libxext6
sudo apt install libxext6:i386

Generate the license key

sudo python2 mgclicgen.py <your-pc-mac-address>
# Note: You need python2 to be precise/questa_sim-2021.2_1.aol

Install the Questasim

sudo chmod +x ./questa_sim-2021.2_1.aol
sudo ./questa_sim-2021.2_1.aol

Select the features needed and proceed with installation

Setup License

  • Copy the license.dat file from /Crack and paste into /Install_dir
  • Copy the pubkey_verify file from /Crack and paste into /Install_dir
cp license.dat pubkey_verify /install_dir
  • Run the ./pubkey_verify -y to apply patch. You should get
FTW done with ret code = 0, all file checked

Total search 22917 files.
Total 3 file are changed.

Add to System Environment Variables

cd ~
sudo nano .bashrc

Add following at the end of bashrc

export PATH="/path/to/questasim/linux_x86_64":$PATH
export PATH="/path/to/questasim/RUVM_2021.2":$PATH
export LM_LICENSE_FILE="/path/to/license.dat":$LM_LICENSE_FILE
  • Save and exit, Run
source .bashrc

Lauch Questasim

vsim

To create a nice looking menu icon

cd /usr/share/applications && sudo nano questasim.desktop

Paste the following:

[Desktop Entry]
Version=2021.2
Name=QuestaSim
Comment=Mentor Graphics Questa Sim
Exec=/opt/questasim/linux_x86_64/vsim
Path=/home/<yourusername>/Documents/QuestaSim
Icon=/home/<yourusername>/Documents/QuestaSim/Icon/iconfilename.png
Terminal=false
Type=Application
Categories=Development;

You need to copy the icon file (png) to the relevant location.

@aitesam961
Copy link
Author

image

@aitesam961
Copy link
Author

image

@aitesam961
Copy link
Author

aitesam961 commented Aug 18, 2024

Means your license isn't configured as it should be. From where have you acquired questasim?

As a side note:
Make sure your system environment variables are set properly. Reload the .bahrc using source .bashrc. Re-open the terminal and try vsim.

Still no...
Make sure your system's mac address is properly patched into the license.dat and you have copied license.dat in Questa's root dir along woith pubkey_verify and have executed pubkey_verify that returns a few lines of log showing a few lines have changed.

@Sheheryar672
Copy link

Sheheryar672 commented Oct 11, 2024

Hello,
i am facing a problem. when i run vsim of terminal. Questa sim opens and a window pops up saying "Unable to checkout a viewer license necessary for use of the QuestaSim graphical user interface. Vsim is closing."
and this is written in the Transcript
"
** License Issue: Invalid host. (path to my license.dat file
** Error: Failure to License for viewer. Unable to checkout 'msimviewer' license feature."

How to fix it?

@fulcrum34
Copy link

Hi @Sheheryar672 , can you list the steps you executed?
I suggest using history command.

Meanwhile, ensure this step is done properly:

sudo python2 mgclicgen.py <your-pc-mac-address> 

Then copy the resultant .dat to the installation dir of questa as described and run pubkey verify

@Yashas2801
Copy link

Yashas2801 commented Dec 4, 2024

Hi, @Sheheryar672 , i am not able to find license.dat and pubkey_verify in the questa installation dir, can you please share the path of these two in your case.
and if i am right the questa dir is the target path which i had given during the installation.

@aitesam961
Copy link
Author

Hi @Yashas2801
No, the pubkey and .Dat are not the part of installation. They are in separate folders outside of questa setup files. Check your source of download for that.

@Yashas2801
Copy link

Can you please share the path of those two files

@aitesam961
Copy link
Author

Hi @Yashas2801 ,it depends. From where did you acquire the questasim?
Check your source if they provide additional files along with setup files.

@Yashas2801
Copy link

Yes, crack folder is given with the setup folder, but i am not getting where to paste the cracked pubkey and .dat file

@aitesam961
Copy link
Author

Hi @Yashas2801
cp license.dat pubkey_verify /install_dir
Should be your guide.
Where install_dir is the path of your questa installation.
You may need 'sudo'

@mrincognito01
Copy link

Any one Please tell me the how to download the crack folder.

@shivaprasad0997
Copy link

Hi @aitesam961 can you plz provide the file to be downloaded for the same. and is it possible to install in 22.04LTS
i am getting python2: can't open file 'mgclicgen.py': [Errno 2] No such file or directory. while running the command

Thank you

@aitesam961
Copy link
Author

aitesam961 commented Feb 24, 2025 via email

@shivaprasad0997
Copy link

Hi, The crack files should come with your download? From where have you downloaded your copy of questasim? And yes it works on 22LTS

On Mon, Feb 24, 2025, 10:01 PM shivaprasad0997 @.> wrote: @.* commented on this gist. ------------------------------ Hi @aitesam961 https://github.com/aitesam961 can you plz provide the file to be downloaded for the same. and is it possible to install in 22.04LTS i am getting python2: can't open file 'mgclicgen.py': [Errno 2] No such file or directory. while running the command Thank you — Reply to this email directly, view it on GitHub https://gist.github.com/aitesam961/608ec27862e942e5ae1360fd0ba2b4d2#gistcomment-5455192 or unsubscribe https://github.com/notifications/unsubscribe-auth/AQCUSPAQQPLXOZLSAZEPELL2RNF7JBFKMF2HI4TJMJ2XIZLTSKBKK5TBNR2WLJDUOJ2WLJDOMFWWLO3UNBZGKYLEL5YGC4TUNFRWS4DBNZ2F6YLDORUXM2LUPGBKK5TBNR2WLJDHNFZXJJDOMFWWLK3UNBZGKYLEL52HS4DFVRZXKYTKMVRXIX3UPFYGLK2HNFZXIQ3PNVWWK3TUUZ2G64DJMNZZDAVEOR4XAZNEM5UXG5FFOZQWY5LFVEYTGMBVGQ3TGOJSU52HE2LHM5SXFJTDOJSWC5DF . You are receiving this email because you were mentioned. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub .

@aitesam961 thank you for your reply. when i commented i don't have any files after that i downloaded from below path
https://www.freesoftwarefiles.com/simulators/mentor-graphics-questasim-2021-for-linux-free-download/ now it is working.
Thanks
Shiva Prasad V

@aitesam961
Copy link
Author

On Ubuntu 24LTS or later, if you ever run into this error

Exception in thread "main" java.lang.ClassFormatError: Unkn <Unknown>
	at java.base/jdk.internal.misc.Unsafe.defineAnonymousClass0(Native Method)
	at java.base/jdk.internal.misc.Unsafe.defineAnonymousClass(Unsafe.java:1223)
	at java.base/java.lang.invoke.InvokerBytecodeGenerator.loadAndInitializeInvokerClass(InvokerBytecodeGenerator.java:291)
	at java.base/java.lang.invoke.InvokerBytecodeGenerator.loadMethod(InvokerBytecodeGenerator.java:283)
	at java.base/java.lang.invoke.InvokerBytecodeGenerator.generateCustomizedCode(InvokerBytecodeGenerator.java:680)

resulting in installer not launching, go to the newly created /mgc/install.aol and edit the line

# Find the location of the java program
if [ -f JRE/bin/java ] ; then
   JAVA=JRE/bin/java
   java_path=$install_dir/$JAVA

TO

# Find the location of the java program
if [ -f /bin/java ] ; then
   JAVA=/bin/java
   java_path=$install_dir/$JAVA

relaunch and it should be fixed.

@mazen-fahim
Copy link

mazen-fahim commented Mar 8, 2025

add this to .desktop if you want to desktop launch it. (Arch - Hyprland)
-gui open the gui without loading a design

[Desktop Entry]
Exec=/opt/questasim/linux_x86_64/vsim -gui

@BillyButler132
Copy link

BillyButler132 commented Apr 3, 2025

Thank you so much for this detailed guide! It worked perfectly for me on Ubuntu 24.04. The environment variable section was especially helpful. Anyone struggling with license issues—double check your MAC address and make sure pubkey_verify runs successfully. Really appreciate the time you put into this! I had never written a proper business case study before, and my professor expected professional-level analysis. Feeling stuck, I made the decision to buy case study online through https://academized.com/buy-case-study-online I went with Academized because their site looked professional and easy to use. The writer followed my instructions perfectly, and the final essay was spot-on. I submitted it confidently and used the extra time to prep for an important exam instead.

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