3

On an EC2 machine, I am trying to install R Integration pack for connecting R with Microstrategy. In the installation of the package MicroStrategyR on R, I got following errors.

ERROR: gtk+2.0 not found by pkg-config.
ERROR: configuration failed for package ‘cairoDevice’

I tried to install RGtk2 separately which failed with following error.

configure: error: GTK version 2.8.0 required

So I downloaded following source gtk+-3.19.3.tar.xz and tried to run ./configure in the unzipped folder. And it fails with following errors.

configure: error: Package requirements (glib-2.0 >= 2.45.8    atk >= 2.15.1    pango >= 1.37.3    cairo >= 1.14.0    cairo-gobject >= 1.14.0    gdk-pixbuf-2.0 >= 2.30.0) were not met:

No package 'glib-2.0' found
No package 'atk' found
No package 'pango' found
No package 'cairo' found
No package 'cairo-gobject' found
No package 'gdk-pixbuf-2.0' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

I tried adding following to the environment variable, and ran it but it resulted in same error.

% export PKG_CONFIG_PATH=/usr/lib64/pkgconfig

So I now downloaded glib-2.45.8.tar.xz and tried to run ./configure in this. And it runs successfully. However when I go back and rerun configure in GTK folder I still get following error.

No package 'glib-2.0' found

Also I checked for cairo, but GTK installation process is not able to find the cairo package.

% sudo yum list cairo Loaded plugins: priorities, security Installed Packages cairo.x86_64

Am I missing some configuration of any environment variable?

Update: Following packages are installed, but atk installation is not found in packages.

sudo yum groupinstall "Development Tools"
sudo yum install glib2.x86_64
sudo yum install pycairo-devel.x86_64
sudo yum install pango-devel.x86_64

I am still facing issues with gtk+-2.10.14 not being able to recognize atk installed from source and gtk+-2.8.0 also not recognizing atk installed from source.

ATK installation steps used:

tar xvf atk-1.9.0.tar.gz
cd atk-1.9.0
sudo ./configure
sudo make
sudo make install
sudo ldconfig

No errors during these ATK steps. Added /usr/local/lib/pkgconfig to the PKG_CONFIG_PATH. Not sure why GTK configure is not able to recognize ATK. Am I missing some step after make install.

Second update: I copied atk.pc into /usr/lib64/pkgconfig folder, but RGtk2 is still not able to find it.

/usr/bin/pkg-config --list-all|grep -i 'gtk'
gtk+-2.0              GTK+ - GIMP Tool Kit (x11 target)
gtk-doc               gtk-doc - API documentation generator
gtk+-x11-2.0          GTK+ - GIMP Tool Kit (x11 target)
gtk+-unix-print-2.0   GTK+ - GIMP Tool Kit Unix print support

R Error:

checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for INTROSPECTION... no
checking for GTK... no
configure: error: GTK version 2.8.0 required
ERROR: configuration failed for package ‘RGtk2’

Third Update: Looks like we have to install gtk-devel package which is not available for EC2. Need to figure out building it from source, but individual versions of gtk-devel are looking for different gtk versions. Why should this be so hard?

Thanks.

androboy
  • 817
  • 1
  • 12
  • 24
  • First, you downloaded GTK+ 3, not GTK+ 2. Second, the `pkg-config` name is `gtk+-2.0`, not `gtk+2.0`. Third, and most important, you really need to do a search in the package manager to see if GTK+ and GLib are available there. I don't know how to do that with yum; sorry. I do know that you might need to install `-devel` packages separately for things like cairo and GLib. Fourth, `./configure` alone isn't enough to build a library; you must also `make` and then `sudo make install` it (but ONLY IF it's not in the package repositories). Fifth, you may need to `export` env vars from the shell. – andlabs Dec 03 '15 at 03:36
  • I don't think you actually need to set `$PKG_CONFIG_PATH` though; it should be set automatically by the distribution maintainer. And last, if EC2 doesn't have its own X server, you'll need to do something like `ssh -X` to be able to run the program from your server to host on your local machine. – andlabs Dec 03 '15 at 03:41
  • Thanks andlabs. I used export for env variable. Edited the question. I also installed yum groupinstall "Development Tools". But for installing gtk, I still get the following error. – androboy Dec 03 '15 at 19:20
  • % sudo yum install gtk+-devel gtk2-devel |||||| Loaded plugins: priorities, security |||||| Setting up Install Process |||||| No package gtk+-devel available. |||||| No package gtk2-devel available. |||||| Error: Nothing to do |||||| – androboy Dec 03 '15 at 19:23
  • Does your shell tab-complete packages in yum? If so try that; if not you'll need to use yum's searching options. – andlabs Dec 03 '15 at 19:27
  • % sudo yum search gtk |||||||||| Loaded plugins: priorities, security |||||||||| ============================================================================================================= N/S Matched: gtk |||||||||| ============================================================================================================== gtk-doc.noarch : API documentation generation tool for GTK+ and GNOME |||||||||| Name and summary matches only, use "search all" for everything.|||||||||| – androboy Dec 03 '15 at 19:55
  • Ok. I now installed glib by using sudo yum install glib2.x86_64. Now while running configure for gtk+-2.10.14 I am only getting atk, pango, cairo missing messages. Let me find them as well. – androboy Dec 03 '15 at 19:59
  • % sudo yum search all atk ||||||||| Loaded plugins: priorities, security ||||||||| Warning: No matches found for: atk ||||||||| No Matches found ||||||||| – androboy Dec 03 '15 at 20:23
  • Then you will need to contact EC2 for more instructions. I don't use EC2 at this time so I don't know it; sorry. – andlabs Dec 03 '15 at 20:24
  • sudo yum install pycairo-devel.x86_64 - is now installed and gtk is now only showing atk, pango missing message. down to two. – androboy Dec 03 '15 at 20:28
  • Almost there.. only atk pending.. sudo yum install pango-devel.x86_64 - done – androboy Dec 03 '15 at 20:29
  • I am stuck at the step of installing atk... I installed atk-1.9.0 by using configure->make -> make install. I dont see any errors there, but when I tried to install gtk+-2.10.14, using configure step throws the same error as ||||||| checking for BASE_DEPENDENCIES... configure: error: Package requirements (glib-2.0 >= 2.12.0 atk >= 1.9.0 pango >= 1.12.0 cairo >= 1.2.0) were not met: ||||||||||||No package 'atk' found – androboy Dec 03 '15 at 22:24
  • I also added additional pkgconfig locations - export $PKG_CONFIG_PATH= /usr/local/lib/pkgconfig:/usr/lib64/pkgconfig – androboy Dec 03 '15 at 22:25
  • I copied atk.pc into /usr/lib64/pkgconfig from /usr/local/lib/pkgconfig/ and ran ldconfig and the gtk+-2.10.14 configure and install ran successfully. But RGtk2 is still not able to find the location of GTK install. – androboy Dec 03 '15 at 23:09
  • It shows that the gtk is installed from pkg-config, but it RGtk2 is still looking for GTK-2.8.0. /usr/bin/pkg-config --list-all|grep -i 'gtk' |||||||||| gtk+-2.0 GTK+ - GIMP Tool Kit (x11 target) |||||||||| gtk-doc gtk-doc - API documentation generator |||||||||| gtk+-x11-2.0 GTK+ - GIMP Tool Kit (x11 target) |||||||||| gtk+-unix-print-2.0 GTK+ - GIMP Tool Kit Unix print support |||||||||| – androboy Dec 03 '15 at 23:10

0 Answers0