I have some systemd services those call to the relevant python3 scripts. Everything work well until a few days ago, a strange log line appeared every time the services start.

python3[28430]: looking for plugins in '/usr/lib64/sasl2', failed to open directory, error: No such file or directory

enter image description here

The same situation happens at all the different environments where our services run on:

  • Ubuntu 19.04 (XFCE4)
  • Ubuntu 18.04 (GNOME)
  • Ubuntu 16.04 (GNOME)
  • Raspbian buster
  • Raspbian stretch

What does the log mean? What does it relate to? How to fix it?


That error indicates that the script was looking for a library directory in your library folder, but it doesn't exist. In particular, it is looking for the sasl2 folder, located in /usr/lib64. SASL, the Simple Authentication and Security Library, is a library that is used for authentication for certain protocols such as POP, IMAP, etc.

Read more about SASL here.

Without knowing what the python scripts are, and what they're intended to do, it's hard to guess as to what exact use of SASL in the case of this script is, although a good guess is for email notifications of some sort of event - maybe a motion notification, based on how the scripts appear to be handling video processing. Did a component of your scripts stop working, or is it just the log message that is new?

Since it is simply a debug log message, if none of your software is broken, it can (likely) be ignored. On the other hand, if your software isn't working as expected, you might need to install the required library. Before installing SASL, however, check to see if it is simply hidden somewhere the python script can't find it.

find / -name "libsasl*" 

On my Ubuntu 16.04 box, it was located in /usr/lib/x86_64-linux-gnu/sasl2. If this is the case for you, I'd try simply creating a symbolic link for the directory that the script is looking for:

ln -sfn /usr/lib/x86_64-linux-gnu/sasl2/ /usr/lib64/sasl2 

To install the library if necessary, use apt (you might still need to create a symbolic link or change the script, depending on the installation directory).

sudo apt-get install libsasl2-2

As an addendum, it's interesting to me that the script is looking in /usr/lib64/sasl2, since it seems that Ubuntu killed off lib<32/64> directories in favor of a single lib directory for multiarch. This means that even when the correct libraries are installed, you might still be required to point the script toward the correct libsasl2 installation directory.

  • you rock, your answer helps me a lot, thank you! Although this log message does not affect our services. But it's annoying when I don't understand the cause. By running your "find" command, I found that libsasl relates to pylibmc. This library just came after I installed memcached and libmemcached-dev to handle cache layer for our project. I got sasl2 located under /usr/lib/x86_64-linux-gnu/ like your machine. Then the command to make symlink resolved the problem. Now the above log message no longer appear. – Dong Nguyen Aug 27 at 2:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.