[CONKY] Cairo module not found

Some useful info is below:

Location of my conky and lua file

$ ls ~/.conky*
.rw-r--r-- 15k hemant 20 Dec 18:11 /home/hemant/.conkyrc
.rwxr-xr-x 19k hemant 20 Dec 18:01 /home/hemant/.conkyrc.lua

My .conkyrc.lua file is HERE and .conkyrc is HERE
Below is the error when i specifically run my conkyrc file by conky -c .conkyrc :

 conky: llua_load: /home/hemant/.conkyrc.lua:13: module 'cairo' not found:
        no field package.preload['cairo']
        no file '/usr/share/lua/5.4/cairo.lua'
        no file '/usr/share/lua/5.4/cairo/init.lua'
        no file '/usr/lib/lua/5.4/cairo.lua'
        no file '/usr/lib/lua/5.4/cairo/init.lua'
        no file './cairo.lua'
        no file './cairo/init.lua'
        no file '/usr/lib/conky/libcairo.so'
        no file '/usr/lib/lua/5.4/cairo.so'
        no file '/usr/lib/lua/5.4/loadall.so'
        no file './cairo.so'

I have installed cairo by pip install pycairo as well.
Something else is also required?
Details of my conky version and installed path is below

conky 1.11.6_pre compiled Sun Nov 22 08:35:26 PM CST 2020 for Linux 5.9.4-arch1-1 x86_64

Compiled in features:

System config file: /etc/conky/conky.conf
Package library path: /usr/lib/conky


 General:
  * math
  * hddtemp
  * portmon
  * IPv6
  * Curl
  * RSS
  * Weather (METAR)
  * wireless
  * support for IBM/Lenovo notebooks
  * nvidia
  * builtin default configuration
  * old configuration syntax
  * Imlib2
  * OSS mixer support
  * apcupsd
  * iostats
  * ncurses
  * Internationalization support
  * PulseAudio
 X11:
  * Xdamage extension
  * Xinerama extension (virtual display)
  * Xshape extension (click through)
  * XDBE (double buffer extension)
  * Xft
  * ARGB visual
  * Own window

 Music detection:
  * CMUS
  * MPD
  * MOC

 Default values:
  * Netdevice: eno1
  * Local configfile: $HOME/.conkyrc
  * Localedir: /usr/share/locale
  * Maximum netdevices: 256
  * Maximum text size: 16384
  * Size text buffer: 256

I use

/home/sgs/.config/conky/

Look what is inside there.
Which DE you use?
Is conky-lua-nv installed?

pacman -Qi conky-lua-nv

$ls ~/.config/conky
"/home/hemant/.config/conky": No such file or directory (os error 2)

I use KDE Dragonized

$pacman -Qi conky-lua-nv
error: package 'conky-lua-nv' was not found

:frowning:

I will try to make this manually.
But i think issue seems to be with cairo

Install it :slight_smile:

sudo pacman -Syu conky-lua-nv

without conky it will not work.

No.

1 Like

I installed conky by yay and which conky shows

/usr/bin/conky

pacman -Qi conky-lua-nv

output is?

1 Like

Previously when i did, it was showing no package found.
Then i installed it by sudo pacman -Syu conky-lua-nv and conky was in conflict which i installed by yay and i removed it.
Now i rebooted and clocks working fine now.
Also before reboot i copied my .conkyrc to ~/.config/conky/conky.conf
And let me confirm it that out of these both which thing did a trick then i will update the post as solved.

1 Like

Put lua conf also there and check conky.conf for the path to lua.conf

2 Likes

So here is the thing.
I deleted my .config/conky/ and this time my both files were at home.
Lua file was never at wrong place as i specify it in conky.conf or .conkyrc file everytime i change path of lua file.
Issue was in conky package downloaded by yay.
After installing conky-lua-nv by pacman my conky is working at both places(~/.conkyrc and ~/.config/conky/conky.conf) perfectly. Thankyou @SGS

3 Likes

Another alternative is conky-cairo (AUR) - and it allows some choices by modifying the PKGBUILD (version, nvidia or not, Audacious support etc etc) That also would have fixed things - I build it with lua 5.4 and audacious, for instance...