PDA

View Full Version : Solution for ".//libreg.so: file not recognized: File format not recognized" (CRDA)



scriptguru
2017-05-05, 02:30
Recently I had to compile my own CRDA regulations file because some of my wifi adapters were locked to other countries so they used much lower transmission power than legally alowed. This process is well described (thanks for everyone who did that!) but there is one error which made me spent quite long time to find the right solution.

At some point you might see an error which requires you to edit Makefile and remove -Werror parameter so that warnings wouldn't stop compilation. That's easy to do, but the next error you see is:

.//libreg.so: file not recognized: File format not recognized
I've seen many people asking how this can be resolved but I've never seen this question answered with a working solution, so I had to find my own solution. In fact it's really easy to resolve: just delete libreg.so and run make again
It looks like when the previous compilation error happens libreg.so is being created but it contains wrong data (or empty - I haven't checked it), and the make script doesn't try to recompile it because the file exists, but it cannot proceed because the file doesn't contain the right data.

Hope it helps somebody!

Zer0ne33
2017-06-19, 13:18
Helped me, mate, so thank you very much! I think I had installed about 50 libnl packages/dependencies I didn't need before I read your post LOL. Thanks again for sharing.