Mac M1 Start Virtual Machine Centos8 with PD to install Kafka error: Error: VM option ‘UseG1GC‘

Error message:

Error: VM option 'UseG1GC' is experimental and must be enabled via -XX:+UnlockExperimentalVMOptions.
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

According to the error message, go to the kafka decompression directory bin/kafka-run-class.sh file, open it with vim, then use /UseG1GC to search for this piece of configuration information, and delete this piece of configuration

and then restart Kafka. If there are similar problems, you can see if there are abnormal similar configurations, you can try to delete them, and remember to backup and save them.

Read More: