I have successfully installed a ubuntu image on my Raspberry Pi 4. I am trying to do some screen customization, and so as a result I'm looking to install this project, fakeXrandr:


Following their install steps, after installing some dependencies, I get the following error which seems related to my architecture (i.e. the RPi):

ubuntu@ubuntu:~/Downloads/fakexrandr-master$ sudo make
XRandR version is 1.5.2
The path to the real XRandR library is /lib/arm-linux-gnueabihf/libXrandr.so.2

ERROR: Failed to find a suitable directory for the fakeXrandr library

You must place the library into the library search path, in a directory preceeding
/lib/arm-linux-gnueabihf. In your system, this leaves the following candidates:

None of these contains `local', therefore I won't autoconfigure the installation to one
of these directories. Either add a high-priority directory in /usr/local using the ldconfig
mechanism (See /etc/ld.so.conf.d/ on most systems) or manually create config.h.

make: *** [Makefile:7: config.h] Error 1

Any ideas how I can overcome this? I have little experience on linux systems and don't know how to use ldconfig or any other of the resources mentioned in the error. Answers much appreciated!


1 Answer 1


I'm not a ubuntu user so have no image to check, but some distros don't configure /usr/local into paths searched by the system runtime (dynamic) linker. This is pretty easy to fix, but first check if it is the case:

grep local /etc/ld.so.conf /etc/ld.so.conf.d/*

If this doesn't return anything:

echo /usr/local/lib > /etc/ld.so.conf.d/local.conf

Both of those require root privileges; the first won't work with sudo because of the redirection, but the point is you want a one line file with /usr/local/lib in it.

See also man ld.so.

  • Great thanks so much for your answer. I'll try now and get back to you shortly.
    – JDS
    Apr 30, 2020 at 19:15
  • sudo echo /usr/local/lib > /etc/ld.so.conf/local.conf bash: /etc/ld.so.conf/local.conf: Not a directory Do I need to make that a directory? Or is it a file? Not sure what to do.
    – JDS
    Apr 30, 2020 at 19:26
  • 1
    Whoops! I left off the .d. Corrected, try all that again. man ldconfig should explain what all this is about. The sudo echo won't work as originally mentioned, but you should be able to use sudo sh -c echo ....
    – goldilocks
    Apr 30, 2020 at 19:46
  • OK, I used sudo vim /etc/ld.so.conf.d/local.conf to add the one line /usr/local/lib. Then I ran sudo ldconfig. Then I ran sudo make but wound up with the same error still as in the OP. (and I verified that my vim editing saved the line into the file.)
    – JDS
    Apr 30, 2020 at 19:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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