문제

I'm trying to play an mp3 file in terminal using C and I followed this link to do so. I've installed the two libraries libmpg123 and libao. Also, I've compiled the play.c program using the command:

gcc -O2 -o play play.c -lmpg123 -lao

But I get the following error when I run it:

./play: error while loading shared libraries: libao.so.4: cannot open shared object file: No such file or directory

Can you figure it out why it happened.

도움이 되었습니까?

해결책

The executable can be linked, but at run-time, it cannot find the shared libraries. Add the libraries to your LD_LIBRARY_PATH so the program can find them at run time.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top