在安装opencv的时候有需要安装依赖,其中有两个比较难装,一个是libjasper-dev
一个是libgtk2.0-dev
,这里我们说一下如何安装libgtk2.0-dev
,关于另一个的安装,请参考:
首先安装aptitude,然后用它来安装:
1 2 |
sudo aptitude install libxcomposite-dev sudo aptitude install libcairo2-dev |
做完这两箱子之后,再次运行sudo apt install libgtk2.0-dev
就可以正常安装了。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
ubuntu@part1:~/bigdisk/anzhaungbao$ sudo apt install libgtk2.0-dev Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: libboost-filesystem1.58.0 libcapnp-0.5.3 libmirclient9 libmircommon7 libmircore1 libmirprotobuf3 Use 'sudo apt autoremove' to remove them. The following additional packages will be installed: autoconf automake autopoint autotools-dev debhelper dh-autoreconf dh-strip-nondeterminism dpkg dpkg-dev gir1.2-atk-1.0 gir1.2-gdkpixbuf-2.0 gir1.2-gtk-2.0 gir1.2-harfbuzz-0.0 gir1.2-pango-1.0 gtk-update-icon-cache gtk2-engines-pixbuf icu-devtools libarchive-cpio-perl libatk1.0-0 libatk1.0-data libatk1.0-dev libdpkg-perl libfile-stripnondeterminism-perl libgail-3-0 libgail-common libgail18 libgdk-pixbuf2.0-0 libgdk-pixbuf2.0-bin libgdk-pixbuf2.0-common libgdk-pixbuf2.0-dev libgraphite2-3 libgraphite2-dev libgtk-3-0 libgtk-3-bin libgtk-3-common libgtk2.0-0 libgtk2.0-bin libharfbuzz-dev libharfbuzz-gobject0 libharfbuzz-icu0 libharfbuzz0b libicu-dev libicu-le-hb-dev libicu-le-hb0 libicu60 libiculx60 libltdl-dev libltdl7 libmail-sendmail-perl libpango-1.0-0 libpango1.0-dev libpangocairo-1.0-0 libpangoft2-1.0-0 libpangoxft-1.0-0 libsys-hostname-long-perl libtool libxcursor-dev libxcursor1 libxft-dev libxinerama-dev libxrandr-dev libxrandr2 m4 po-debconf x11proto-randr-dev x11proto-xinerama-dev Suggested packages: autoconf-archive gnu-standards autoconf-doc dh-make dwz debsig-verify debian-keyring bzr libgraphite2-utils libgtk2.0-doc icu-doc libtool-doc libpango1.0-doc gfortran | fortran95-compiler gcj-jdk m4-doc libmail-box-perl The following NEW packages will be installed: autoconf automake autopoint autotools-dev debhelper dh-autoreconf dh-strip-nondeterminism gir1.2-gtk-2.0 gir1.2-harfbuzz-0.0 gtk-update-icon-cache icu-devtools libarchive-cpio-perl libatk1.0-dev libfile-stripnondeterminism-perl libgdk-pixbuf2.0-bin libgdk-pixbuf2.0-dev libgraphite2-dev libgtk2.0-dev libharfbuzz-dev libharfbuzz-gobject0 libicu-dev libicu-le-hb-dev libicu-le-hb0 libicu60 libiculx60 libltdl-dev libmail-sendmail-perl libpango1.0-dev libsys-hostname-long-perl libtool libxcursor-dev libxft-dev libxinerama-dev libxrandr-dev m4 po-debconf x11proto-randr-dev x11proto-xinerama-dev The following packages will be upgraded: dpkg dpkg-dev gir1.2-atk-1.0 gir1.2-gdkpixbuf-2.0 gir1.2-pango-1.0 gtk2-engines-pixbuf libatk1.0-0 libatk1.0-data libdpkg-perl libgail-3-0 libgail-common libgail18 libgdk-pixbuf2.0-0 libgdk-pixbuf2.0-common libgraphite2-3 libgtk-3-0 libgtk-3-bin libgtk-3-common libgtk2.0-0 libgtk2.0-bin libharfbuzz-icu0 libharfbuzz0b libltdl7 libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0 libpangoxft-1.0-0 libxcursor1 libxrandr2 29 upgraded, 38 newly installed, 0 to remove and 1688 not upgraded. Need to get 31.6 MB of archives. After this operation, 110 MB of additional disk space will be used. Do you want to continue? [Y/n] |
本文最后更新于2019年6月24日,已超过 1 年没有更新,如果文章内容或图片资源失效,请留言反馈,我们会及时处理,谢谢!