VMware中Ubuntu 22.04安装Pycharm时出现黑屏问题求助
Hey there, sorry to hear you're stuck with this black screen when trying to install PyCharm on your Ubuntu 22.04 VM—let's walk through some possible fixes together, since this sounds like a virtual machine graphics or setup quirk rather than a common PyCharm issue.
Here are some troubleshooting steps to try:
Adjust VMware's display settings
Virtual machines often run into graphics-related issues if the allocated resources are too low. Open VMware, select your Ubuntu VM, click Edit virtual machine settings, go to the Display tab:- Increase the Graphics memory (try setting it to 2GB if your host has enough RAM to spare)
- Check the box for Accelerate 3D graphics
Save the settings and restart your VM, then try installing PyCharm again.
Verify VMware Tools is installed properly
VMware Tools handles graphics, mouse integration, and other VM essentials—if it's missing or outdated, it can cause display glitches.- In Ubuntu's terminal, run
vmware-toolbox-cmd -v; if you get an error or no output, re-install it:- Go to VMware's top menu > Virtual Machine > Install VMware Tools
- In Ubuntu, the Tools ISO will mount automatically—open it, copy the
.tar.gzfile to your home directory - Extract it with
tar -xzf VMwareTools-*.tar.gz, then enter the extracted folder and runsudo ./vmware-install.pl - Follow the prompts to complete installation, then restart your VM.
- In Ubuntu's terminal, run
Install PyCharm via the command line or Ubuntu Software
If you were using the.runinstaller from the JetBrains website, try a more stable installation method:- Option 1: Ubuntu Software
Open the Ubuntu Software app, search for PyCharm, select either the Community or Professional edition, and click Install. This uses Ubuntu's official package repositories, which are less likely to cause display conflicts. - Option 2: Manual command-line setup
Download the PyCharm.tar.gzpackage from JetBrains, then:- Create an
optfolder in your home directory withmkdir ~/opt - Extract the package into this folder:
tar -xzf pycharm-*.tar.gz -C ~/opt - Navigate to the
binfolder:cd ~/opt/pycharm-*/bin - Start PyCharm with
./pycharm.sh—this bypasses any graphical installer issues and lets you launch directly.
- Create an
- Option 1: Ubuntu Software
Check your Java environment
While PyCharm comes with its own JRE, a missing system Java installation can sometimes cause unexpected glitches. Runjava -versionin the terminal—if you see an error, install OpenJDK 17 with:sudo apt update && sudo apt install openjdk-17-jreThen try launching PyCharm again.
Since you're new to Ubuntu, don't worry if some steps feel unfamiliar—take it one at a time, and let me know if any of these fixes work, or if you need more details on any step!
备注:内容来源于stack exchange,提问作者amine

