conky icon indicating copy to clipboard operation
conky copied to clipboard

[Bug]: module cairo not found

Open joppe opened this issue 2 years ago • 2 comments

What happened?

I'm using Pop!_OS and installed conky-all, this should contain cario. When I add require 'ciaro' to my config I get the message module 'cairo' not found followed with a lot of paths it tried to find the file. When I looked in the folder /usr/lib/conky/ I found a file libcairo.so. By creating a symlink to one of the paths it searched for (I did /usr/lib/lua/5.3) the problem is fixed. I really would like to create a pull request with a fix, but I don't know if this is a Conky thing or OS specific bug. There are a lot of people reporting this problem.

Version

1.12.2

Which OS/distro are you seeing the problem on?

Linux (other)

Conky config

require 'cairo'

conky.config = {
    alignment = 'top_left',
    background = false,
    border_width = 1,
    cpu_avg_samples = 2,
    default_color = 'green',
    default_outline_color = 'white',
    default_shade_color = 'white',
    double_buffer = true,
    draw_borders = false,
    draw_graph_borders = true,
    draw_outline = false,
    draw_shades = false,
    extra_newline = false,
    font = 'DejaVu Sans Mono:size=12',
    gap_x = 60,
    gap_y = 60,
    minimum_height = 5,
    minimum_width = 5,
    net_avg_samples = 2,
    no_buffers = true,
    out_to_console = false,
    out_to_ncurses = false,
    out_to_stderr = false,
    out_to_x = true,
    own_window = true,
    own_window_class = 'Conky',
    own_window_type = 'desktop',
    show_graph_range = false,
    show_graph_scale = false,
    stippled_borders = 0,
    update_interval = 1.0,
    uppercase = false,
    use_spacer = 'none',
    use_xft = true,
}

conky.text = [[
${color grey}Info:$color ${scroll 32 Conky $conky_version - $sysname $nodename $kernel $machine}
$hr
${color grey}Uptime:$color $uptime
${color grey}Frequency (in MHz):$color $freq
${color grey}Frequency (in GHz):$color $freq_g
${color grey}RAM Usage:$color $mem/$memmax - $memperc% ${membar 4}
${color grey}Swap Usage:$color $swap/$swapmax - $swapperc% ${swapbar 4}
${color grey}CPU Usage:$color $cpu% ${cpubar 4}
${color grey}Processes:$color $processes  ${color grey}Running:$color $running_processes
$hr
${color grey}File systems:
 / $color${fs_used /}/${fs_size /} ${fs_bar 6 /}
${color grey}Networking:
Up:$color ${upspeed} ${color grey} - Down:$color ${downspeed}
$hr
${color grey}Name              PID     CPU%   MEM%
${color lightgrey} ${top name 1} ${top pid 1} ${top cpu 1} ${top mem 1}
${color lightgrey} ${top name 2} ${top pid 2} ${top cpu 2} ${top mem 2}
${color lightgrey} ${top name 3} ${top pid 3} ${top cpu 3} ${top mem 3}
${color lightgrey} ${top name 4} ${top pid 4} ${top cpu 4} ${top mem 4}
]]

Stack trace

No response

Relevant log output

No response

joppe avatar Feb 03 '23 07:02 joppe

You can check the output of conky -v to see which options were compiled. It should list "Cairo" under "Lua bindings".

philer avatar Mar 31 '23 20:03 philer

Conky 1.12.2 (the latest version in Ubuntu repos) and 1.18.3 (the latest version in Debian repos) both include Cairo under "Lua bindings".

conky-all is failing to distribute libraries to these searched paths:

	no file '/usr/local/share/lua/5.3/cairo.lua'
	no file '/usr/local/share/lua/5.3/cairo/init.lua'
	no file '/usr/local/lib/lua/5.3/cairo.lua'
	no file '/usr/local/lib/lua/5.3/cairo/init.lua'
	no file '/usr/share/lua/5.3/cairo.lua'
	no file '/usr/share/lua/5.3/cairo/init.lua'
	no file './cairo.lua'
	no file './cairo/init.lua'
	no file '/tmp/AppImageLauncher-build-jiMGGy/AppDir/usr/lib/conky/libcairo.so'
	no file '/usr/local/lib/lua/5.3/cairo.so'
	no file '/usr/lib/x86_64-linux-gnu/lua/5.3/cairo.so'
	no file '/usr/lib/lua/5.3/cairo.so'
	no file '/usr/local/lib/lua/5.3/loadall.so'
	no file './cairo.so'

Copying /usr/lib/conky/libcairo.so to my home directory as cairo.so solved the issue so I can only assume this is an easy fix. I don't know how users are otherwise expected to have installed Cairo on their systems.

IfGremlinThen avatar Oct 07 '23 03:10 IfGremlinThen

I just checked ubuntu packages and 1.12.2-1 and version prior to that both should've installed /usr/lib/conky/libcairo.so. Debian runs cmake and install manually as far as I can tell, and those should install libcairo as well.

Might be related to #1607.

Caellian avatar Apr 17 '24 10:04 Caellian