I tried "locate libevent", but it doesn't work. and nothing happens.
You may have to run
updatedb first, though it's often set up to run automatically.
Are you certain that path exists which includes libevent? If not try searching for something you know exists (etc, your home directory, and so on)
As already mentioned,
locate uses a proprietary database which contains all filenames of the system (or at least of the directories which have been configured to be included in this database). To (re-) build this database you need to run
You could also use find (e. g.
find / -name 'libevent*') to search for the file which will take longer (depending on the size of your harddisk) but needs no database.
locate silently returns nothing when it doesn't find what you requested.