该软件包libcairo2-dev是最新版本的 Cairo 图形库 (1.10.2)。有什么办法可以安装 1.8.10 版吗?
我正在运行 11.10,但如果可能的话,我会对通用解决方案感兴趣。
我想将 VLC 和其他程序添加到开罗码头,但我不知道如何。我不小心从码头上取下了终端,我想把它拿回来。
我正在使用 Gnome 桌面。
我已经使用 安装了 cairo-1.4.14 make install,但是在尝试编译我的代码之后:
fatal error: cairo.h: No such file or directory
#include <cairo.h>
^
Run Code Online (Sandbox Code Playgroud)
我用这个编译:
g++ screenshot.cpp
Run Code Online (Sandbox Code Playgroud)
我从这个输出安装了 3 个包,但仍然是同样的问题:
apt-file search --regex /cairo.h$
libcairo2-dev: /usr/include/cairo/cairo.h
r-cran-rgtk2: /usr/lib/R/site-library/RGtk2/include/RGtk2/cairo.h
thunderbird-dev: /usr/include/thunderbird/cairo/cairo.h
Run Code Online (Sandbox Code Playgroud)
系统信息:
lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.3 LTS
Release: 14.04
Codename: trusty
Run Code Online (Sandbox Code Playgroud)
的输出pkg-config --libs --cflags cairo:
-I/usr/local/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -L/usr/local/lib -lcairo
Run Code Online (Sandbox Code Playgroud) 这是我的代码,我根本无法弄清楚为什么我的顶级窗口没有变得透明。
xwininfo 说 windows 有 32 位深度。我正在运行 Ubuntu 11.10,如果我在窗口本身上调用 .set_opacity(.5),它将变得透明。但是窗口的所有内容也是如此。我想要一个透明的背景,但小部件应该保持不透明。
我查看了 notify-osd 代码,他们在主窗口上调用了 set_opacity。然而,我无法弄清楚为什么 osd 上的其他小部件保持不透明。这是代码:
#!/usr/bin/env python
from gi.repository import Gtk, Gdk
class MyWin (Gtk.Window):
def __init__(self):
super(MyWin, self).__init__()
self.set_position(Gtk.WindowPosition.CENTER)
self.set_border_width(30)
self.screen = self.get_screen()
self.visual = self.screen.get_rgba_visual()
if self.visual != None and self.screen.is_composited():
print "yay"
self.set_visual(self.visual)
box = Gtk.Box()
btn1 = Gtk.Button(label="foo")
box.add(btn1)
self.add(box)
self.set_app_paintable(True)
self.connect("draw", self.area_draw)
self.show_all()
def area_draw(self, widget, cr):
cr.set_source_rgba(0, 0, 0, .3)
cr.paint()
# def screen_changed(self, widget, cr):
# self.screen = widget.get_screen()
# self.visual = …Run Code Online (Sandbox Code Playgroud) 为了让 CairoPlot 在我的 Ubuntu 11.04 上正确运行,我愚蠢地将 CairoPlot.py 复制到我的/usr/local/bin/python目录中。当我意识到这不是要走的路时,我删除了文件,现在在终端中运行“python”只是挂起,我已经重新启动了机器,有什么想法吗?
我正在运行 Ubuntu 14.04 并尝试编译 libgdiplus(按照http://www.lovesmesomecode.com/20130719-compiling-mono-3-in-ubuntu/ 上的说明进行操作)以准备安装 NZBdrone。
运行 ./autogen.sh --prefix=/usr/local 时发生错误。(我在此之前遵循了所有说明。)此命令的说明说:
这将配置编译过程并确保您的计算机安装了所有正确的库和依赖项。如果你运行了上面的一切,你应该很高兴。如果它因错误而失败并表明您缺少库或包,您可能需要安装该包的开发版本,然后再次尝试运行该命令。
我收到的错误说:
检查开罗...不
配置:错误:未满足包要求(开罗> = 1.6.4):
未找到包裹“cairo”
如果您在非标准前缀中安装了软件,请考虑调整 PKG_CONFIG_PATH 环境变量。
或者,您可以设置环境变量 CAIRO_CFLAGS 和 CAIRO_LIBS 以避免调用 pkg-config。有关更多详细信息,请参阅 pkg-config 手册页。
我在另一个地方找到了安装 cairo 的说明,所以我尝试运行命令来安装 cairo。我还找到了安装 libgdiplus 的说明,并尝试使用“sudo apt-get install libgdiplus”进行安装。
但是每次我回来运行'./autogen.sh --prefix=/usr/local'时,我都会收到相同的错误消息,即找不到cairo。
感谢您提供的任何帮助。
我在 WSL 2 上运行 Ubuntu 20.04。我安装了 libpangocairo,但找不到它的任何头文件。
我应该安装 pangocairo:
$ apt list --installed|grep pango
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
libpango-1.0-0/focal,now 1.44.7-2ubuntu4 amd64 [installed]
libpango-perl/focal,now 1.227-3build1 amd64 [installed]
libpangocairo-1.0-0/focal,now 1.44.7-2ubuntu4 amd64 [installed,automatic]
libpangoft2-1.0-0/focal,now 1.44.7-2ubuntu4 amd64 [installed,automatic]
Run Code Online (Sandbox Code Playgroud)
但头文件都不存在:
$ find . -path ./mnt -prune -o -print |grep pango
./usr/lib/x86_64-linux-gnu/libpango-1.0.so.0.4400.7
./usr/lib/x86_64-linux-gnu/libpangocairo-1.0.so.0.4400.7
./usr/lib/x86_64-linux-gnu/libpangoft2-1.0.so.0
./usr/lib/x86_64-linux-gnu/libpangocairo-1.0.so.0
./usr/lib/x86_64-linux-gnu/libpangoft2-1.0.so.0.4400.7
./usr/lib/x86_64-linux-gnu/perl5/5.30/Pango/Install/pango-perl.typemap
./usr/lib/x86_64-linux-gnu/perl5/5.30/Pango/Install/pango-perl.h
./usr/lib/x86_64-linux-gnu/perl5/5.30/Pango/Install/pango-perl-autogen.h
./usr/lib/x86_64-linux-gnu/perl5/5.30/Pango/Install/pango-perl-versions.h
./usr/lib/x86_64-linux-gnu/perl5/5.30/Pango/Install/pango.typemap
./usr/lib/x86_64-linux-gnu/libpango-1.0.so.0
./usr/share/doc/libpangocairo-1.0-0
./usr/share/doc/libpangocairo-1.0-0/changelog.Debian.gz
./usr/share/doc/libpangocairo-1.0-0/copyright
./usr/share/doc/libpango-1.0-0
./usr/share/doc/libpango-1.0-0/NEWS.gz
./usr/share/doc/libpango-1.0-0/README.md
./usr/share/doc/libpango-1.0-0/THANKS
./usr/share/doc/libpango-1.0-0/changelog.Debian.gz
./usr/share/doc/libpango-1.0-0/copyright
./usr/share/doc/libpango-perl
./usr/share/doc/libpango-perl/changelog.Debian.gz
./usr/share/doc/libpango-perl/examples
./usr/share/doc/libpango-perl/examples/cairo-simple.pl
./usr/share/doc/libpango-perl/copyright …Run Code Online (Sandbox Code Playgroud)