I am a little white, but recently in the Linux system running LCM spy encountered a variety of error messages. Finally, after collecting all kinds of information on the Internet and a little bit of my imagination, I successfully solved the problem, so I want to share it with you and leave a file for myself, so as not to be at a loss when I encounter the same problem in the future.
First, follow the official LCM guidelines Before installing LCM, be sure to download its recommended default JDK. This automatic download is the latest version of Java (I don’t know much about Java, but it also seems to download javac). Bloggers download Java 11 by default. Note: Java 8 can’t run make successfully, at least the blogger failed.
Default JDK installation steps:
$ sudo apt update
$ sudo apt install default-jdk
Then follow the steps to install according to the official website (cmake may say that some files in other languages cannot be found, but you can try to run make first)
$ mkdir build
$ cd build
$ cmake ..
$ make
$ sudo make install
If there is no error in make and make install, please check whether there is an LCM Java folder and whether there is lcm.jar in the folder under build. This is very important, because it determines whether you can run LCM spy
Next, you need to download Java 8 and change the default version of Java to Java 8. The method is as follows (the first and second behaviors download Java 8, and the third behavior change the version)
$ sudo apt-get update
$ sudo apt-get install openjdk-8-jdk
$ sudo update-alternatives --config java
Then select the number corresponding to Java 8 in the pop-up window and press enter:
Next, you need to move the lcm.jar to the Java folder. Note: the specific address varies from person to person. Please check the address of the Java folder in usr. Bloggers provide their own examples:
$ sudo cp ~/lcm-1.4.0/build/lcm-java/lcm.jar /usr/share/java/
In this way, you can find the LCM. Jar file in the Java folder. If there is no accident, you can run LCM spy and LCM logplayer GUI in any path.
——————————————————————————————————————————
PS:
1. Two versions of Java are needed because during the installation of LCM v1.4.0, Java related files only support Java 11 (maybe Java 10), but not Java 8. However, the operation of LCM spy does not support Java 11, because Java 11 has deleted an option named “xincgc” in Java 8, so it needs to change the Java version to Java 8 to run successfully;
2. A Java application notes in the official website Bloggers did not run successfully, so they have to manually copy LCM. Jar to the Java folder. If you are interested, you can also try whether the official website tutorial is useful.
Read More:
- Httprunner v3. X generates HTML report in assure format
- ADT:v22.6.2-1085508 Creating Android project and creating appcompat automatically_ V7 solution
- Solution of modulenotfounderror in running pychar
- Solve the problem of error running xxxapplication command line is too long when compiling and running IntelliJ idea
- Solutions to errors in virtual machine running in Android studio
- Idea for Mac setting JVM running parameters to solve running stuck problem
- Problems encountered in running OpenGL
- Idea running error running ‘application’: solution to command line is too long
- In win10 environment, Ctrl + C cannot be copied and Ctrl + V cannot be pasted
- Error in running script in openwrt
- Gms2 (gamemaker Studio 2) running problems encountered in the project
- no matching manifest for linux/arm64/v8 in the manifest list entries
- [solution] the system is running in low graphics mode
- for k, v in k_map: ValueError: too many values to unpack (expected 2)
- Asp.netcore project publishing and deploying to IIS needs aspnetcore module v2
- Running course of Kafka in Windows Environment
- Error in dev C + + running pointer
- P2V error log
- Solution of server not running yetexception in HBase
- Windows batch: File running in the background