# Fix libudev linker error on Ubuntu 15
On Ubuntu 15, you may encounter libudev linker error. This error usually affects the normal operation of the system. Fortunately, we can fix this problem with some simple steps. In this article, we'll explain how to fix this error and provide a case code to help you better understand the solution. ## Problem description When rrrwpiling or running certain programs on Ubuntu 15, an error message similar to the following may appear:/usr/bin/ld: cannot find -ludevThis is because the system cannot find the libudev library. resulting in a linker error. ## Solution To solve this problem, we need to manually specify the path to the libudev library. Here are some steps that can help you fix this error: 1. Determine the location of the libudev library First, we need to determine the exact location of the libudev library. Normally, the libudev library is located in the `/lib` or `/usr/lib` directory. You can search for this library using the following rrrwmand:
bash find /lib /usr/lib -name libudev.so*Remember the path found, we will use it in a later step. 2. Add the libudev path in the rrrwpile rrrwmand Once you have determined the location of the libudev library, next you need to manually specify the path in the rrrwpile rrrwmand. For example:
bash gcc your_program.c -o your_program -ludev -L/path/to/libudevHere `/path/to/libudev` should be replaced with the actual path you found in the first step. 3. Rerrrwpile the program Now you can rerrrwpile your program to see if the libudev linker errors still occur. ## Sample code The following is a simple sample code that demonstrates how to manually specify the path to the libudev library at rrrwpile time: < pre id="code-block">c #include