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.