pkg-config --version always gives 0.26 - pkg-config

So, was reading about pkg-config (I think it's included by default on Debian, which I'm on). But every time I try to find the version for something, it gives me 0.26.
santeyio#Amadeus:/$ pkg-config --version python
0.26
santeyio#Amadeus:/$ pkg-config --version libre-office
0.26
santeyio#Amadeus:/$ pkg-config --version alsdkfj
0.26
santeyio#Amadeus:/$ pkg-config --version firefox
0.26
santeyio#Amadeus:/$
So, I tried sudo apt-get removing it, then installing it again. But I get the same results. I know I'm missing something stupid here... can anyone point me in the right direction?
Here's the output from my re-installing, if that's helpful...
santeyio#Amadeus:/$ sudo apt-get install pkg-config
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
calligra-l10n-engb cdparanoia comerr-dev k3b k3b-data k3b-i18n kdevelop-php-docs-l10n
kdevelop-php-l10n krb5-multidev language-pack-kde-en libasprintf0c2:i386 libcroco3:i386
libgcrypt11-dev libgnutls-dev libgnutls-openssl27 libgnutlsxx27 libgomp1:i386 libgpg-error-dev
libgssrpc4 libk3b6 libkadm5clnt-mit8 libkadm5srv-mit8 libkcddb4 libkdb5-6 libkrb5-dev libldap2-dev
libp11-kit-dev librtmp-dev libtasn1-3-dev linux-headers-3.5.0-17 postgresql-client-9.2
postgresql-common python-xkit screen-resolution-extra
Use 'apt-get autoremove' to remove them.
The following NEW packages will be installed:
pkg-config
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 41.3 kB of archives.
After this operation, 136 kB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu/ quantal/main pkg-config amd64 0.26-1ubuntu2 [41.3 kB]
Fetched 41.3 kB in 0s (66.2 kB/s)
Selecting previously unselected package pkg-config.
(Reading database ... 247983 files and directories currently installed.)
Unpacking pkg-config (from .../pkg-config_0.26-1ubuntu2_amd64.deb) ...
Processing triggers for man-db ...
Setting up pkg-config (0.26-1ubuntu2) ...

Use --modversion.
$ pkg-config --modversion python
2.7
pkg-config is meant to be used when compiling against a library -- if you're trying to check the version of a package, use dpkg -s
$ dpkg -s firefox
Package: firefox
Status: install ok installed
Priority: optional
Section: web
Installed-Size: 48531
Maintainer: Ubuntu Mozilla Team <ubuntu-mozillateam#lists.ubuntu.com>
Architecture: amd64
Version: 17.0.1+build1-0ubuntu0.12.04.1
Or apt-cache policy
$ apt-cache policy firefox
firefox:
Installed: 17.0.1+build1-0ubuntu0.12.04.1
Candidate: 20.0+build1-0ubuntu0.12.04.3
...

Related

Ruby installation with rbenv fails on WSL2 with openssl/openyaml error

I'm trying to install Ruby in Windows using Windows Linux Subsystem and rbenv following these instructions.
$ rbenv install 3.0.1
Downloading ruby-3.0.1.tar.gz...
-> https://cache.ruby-lang.org/pub/ruby/3.0/ruby-3.0.1.tar.gz
Installing ruby-3.0.1...
BUILD FAILED (Ubuntu 20.04 using ruby-build 20210423)
Inspect or clean up the working tree at /tmp/ruby-build.20210428105920.7360.VTYCTG
Results logged to /tmp/ruby-build.20210428105920.7360.log
Last 10 log lines:
To eliminate this warning, please install libyaml and reinstall your ruby.
The Ruby yaml extension was not compiled.
ERROR: Ruby install aborted due to missing extensions
Try running `apt-get install -y libssl-dev libyaml-dev` to fetch missing dependencies.
Configure options used:
--prefix=/home/skarcher/.rbenv/versions/3.0.1
--enable-shared
LDFLAGS=-L/home/skarcher/.rbenv/versions/3.0.1/lib
CPPFLAGS=-I/home/skarcher/.rbenv/versions/3.0.1/include
Nothing more helpful in the log -- it looks like most of the install is working and the error seems quite straightforward, but libssl-dev and libyaml-dev are installed:
$ sudo apt-get install -y libssl-dev libyaml-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
libyaml-dev is already the newest version (0.2.2-1).
libssl-dev is already the newest version (1.1.1f-1ubuntu2.3).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
I couldn't find any reference to this issue other than posts referring to rbenv on Mac OS with older ruby versions. Any help/thoughts much appreciated.

brew install gcc49 on OS X 10.10 (Unable to find a usable ISL)

When I try to install gcc49, I receive an error
$ brew install https://raw.githubusercontent.com/Homebrew/homebrew-versions/master/gcc49.rb
######################################################################## 100.0%
==> Downloading http://ftpmirror.gnu.org/gcc/gcc-4.9.3/gcc-4.9.3.tar.bz2
Already downloaded: /Library/Caches/Homebrew/gcc49-4.9.3.tar.bz2
==> ../configure --build=x86_64-apple-darwin14.5.0 --prefix=/usr/local/Cellar/gcc49/4.9.3 --libdir=/usr/local/Cellar/gcc49/4.9.3/lib/gcc/4.9 --enable-languages=c,c++,objc,obj-c++ --program-suffix=-4.9 --w
checking for version 0.10 of ISL... no
checking for version 0.11 of ISL... no
checking for version 0.12 of ISL... no
checking for version 0.14 of ISL... no
configure: error: Unable to find a usable ISL. See config.log for details.
Warning: It appears you have MacPorts or Fink installed.
Software installed with other package managers causes known problems for
Homebrew. If a formula fails to build, uninstall MacPorts/Fink and try again.
READ THIS: https://git.io/brew-troubleshooting
However, I do have ISL:
$ brew info isl
isl: stable 0.14.1 (bottled), HEAD
Integer Set Library for the polyhedral model
http://freecode.com/projects/isl
/usr/local/Cellar/isl/0.14.1 (68 files, 3.2M) *
Poured from bottle
From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/isl.rb
==> Dependencies
Build: xz ✔
Required: gmp ✔
I do not know where is the config.log located.
The correct way to install GCC 4.9 is to use
$ brew install homebrew/versions/gcc49
This way Homebrew will correctly resolve the missing dependencies and install them for you. You can find this version of gcc (or any other) using
$ brew search gcc49
homebrew/versions/gcc49
or
$ brew search gcc
gcc homebrew/versions/gcc47
homebrew/dupes/apple-gcc42 homebrew/versions/gcc48
homebrew/versions/gcc43 homebrew/versions/gcc49
homebrew/versions/gcc44 homebrew/versions/gcc5
homebrew/versions/gcc45 homebrew/versions/llvm-gcc28
homebrew/versions/gcc46
However, the dependency you are missing is not isl but isl011. You can install it with
$ brew install isl011
We can see that this is a dependency of gcc49 with
$ brew info gcc49
==> Dependencies
Required: gmp4 ✔, libmpc08 ✔, mpfr2 ✔, cloog018 ✔, isl011 ✔
The problem is caused by updated Xcode. Need run : "$ xcode-select --install"

Ruby-build giving me Autoconf version 2.67 or higher is required

Trying to install Ruby 2.2.0-dev using ruby-build gives me an error about Autoconf:
$ rbenv install 2.2.0-dev
Cloning https://github.com/ruby/ruby.git...
Installing ruby-2.2.0-dev...
BUILD FAILED
Inspect or clean up the working tree at /var/folders/3x/y_8y8vr53ws_kxj97km79q5h0000gn/T/ruby-build.20140107115843.2294
Results logged to /var/folders/3x/y_8y8vr53ws_kxj97km79q5h0000gn/T/ruby-build.20140107115843.2294.log
Last 10 log lines:
/var/folders/3x/y_8y8vr53ws_kxj97km79q5h0000gn/T/ruby-build.20140107115843.2294 ~/bogus/path
Cloning into 'ruby-2.2.0-dev'...
/var/folders/3x/y_8y8vr53ws_kxj97km79q5h0000gn/T/ruby-build.20140107115843.2294/ruby-2.2.0-dev /var/folders/3x/y_8y8vr53ws_kxj97km79q5h0000gn/T/ruby-build.20140107115843.2294 ~/bogus/path
configure.in:6: error: Autoconf version 2.67 or higher is required
configure.in:6: the top level
autom4te: /usr/bin/gm4 failed with exit status: 63
Homebrew seems to claim that autoconf 2.69 is available. Unless it's only using autoconf for itself, without allowing it to be used by others:
$ brew list autoconf
/usr/local/Cellar/autoconf/2.69/bin/ifnames
/usr/local/Cellar/autoconf/2.69/bin/autoupdate
/usr/local/Cellar/autoconf/2.69/bin/autoscan
/usr/local/Cellar/autoconf/2.69/bin/autoreconf
/usr/local/Cellar/autoconf/2.69/bin/autom4te
/usr/local/Cellar/autoconf/2.69/bin/autoheader
/usr/local/Cellar/autoconf/2.69/bin/autoconf
/usr/local/Cellar/autoconf/2.69/share/autoconf/ (42 files)
/usr/local/Cellar/autoconf/2.69/share/emacs/ (4 files)
/usr/local/Cellar/autoconf/2.69/share/man/ (9 files)
I don't think homebrew is using autoconf for itself (keg-only?), because doing brew upgrade autoconf gave me Error: autoconf-2.69 already installed.
However, when I run autoconf, it claims that it's only version 2.61:
$ autoconf --version
autoconf (GNU Autoconf) 2.61
My $PATH:
/Users/agrimm/.rbenv/shims:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/git/bin
My uname:
$ uname -a
Darwin [redacted] 11.4.2 Darwin Kernel Version 11.4.2: Thu Aug 23 16:25:48 PDT 2012; root:xnu-1699.32.7~1/RELEASE_X86_64 x86_64
How do I fix the error in installing 2.2.0-dev?
Does ruby-build use its own autoconf, or does it only use whatever is available to the user? If so, what is the recommended way to make autoconf 2.67 or higher available to ruby-build?
brew link --overwrite autoconf will make rbenv use homebrew autoconf version.

RVM Ruby 2.0.0 installation fails in Ubuntu 11

$ rvm install 2.0.0
Searching for binary rubies, this might take some time.
No binary rubies available for: ubuntu/11.10/i386/ruby-2.0.0-p247.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Installing requirements for ubuntu, might require sudo password.
Requirements installation successful.
Installing Ruby from source to: /home/unik/.rvm/rubies/ruby-2.0.0-p247, this may take a while depending on your cpu(s)...
ruby-2.0.0-p247 - #downloading ruby-2.0.0-p247, this may take a while depending on your connection...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (22) The requested URL returned error: 404
The requested url does not exist(22): 'http://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p247.tar.bz2'
Trying ftp:// URL instead.
curl: (6) Couldn't resolve host 'ftp'
There was an error(6), please check /home/unik/.rvm/log//*.log
There has been an error fetching the ruby interpreter. Halting the installation.
$ cat /home/unik/.rvm/log/ruby-2.0.0-p247/1375803282_package_install_libyaml-dev_libsqlite3-dev_libgdbm-dev.log
Reading package lists...
Building dependency tree...
Reading state information...
Suggested packages:
sqlite3-doc
The following NEW packages will be installed:
libgdbm-dev libsqlite3-dev libyaml-dev
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 530 kB of archives.
After this operation, 1,610 kB of additional disk space will be used.
Get:1 http://ua.archive.ubuntu.com/ubuntu/ oneiric/main libgdbm-dev i386 1.8.3-10 [25.1 kB]
Get:2 http://ua.archive.ubuntu.com/ubuntu/ oneiric/main libsqlite3-dev i386 3.7.7-2ubuntu2 [438 kB]
Get:3 http://ua.archive.ubuntu.com/ubuntu/ oneiric/main libyaml-dev i386 0.1.4-1 [66.4 kB]
Fetched 530 kB in 0s (1,089 kB/s)
Selecting previously deselected package libgdbm-dev.
(Reading database ... 709975 files and directories currently installed.)
Unpacking libgdbm-dev (from .../libgdbm-dev_1.8.3-10_i386.deb) ...
Selecting previously deselected package libsqlite3-dev.
Unpacking libsqlite3-dev (from .../libsqlite3-dev_3.7.7-2ubuntu2_i386.deb) ...
Selecting previously deselected package libyaml-dev.
Unpacking libyaml-dev (from .../libyaml-dev_0.1.4-1_i386.deb) ...
Processing triggers for man-db ...
Setting up libgdbm-dev (1.8.3-10) ...
Setting up libsqlite3-dev (3.7.7-2ubuntu2) ...
Setting up libyaml-dev (0.1.4-1) ...
$ rvm list known
# MRI Rubies
[ruby-]1.8.6[-p420]
[ruby-]1.8.7[-p374]
[ruby-]1.9.1[-p431]
[ruby-]1.9.2[-p320]
[ruby-]1.9.3[-p448]
[ruby-]2.0.0-p195
[ruby-]2.0.0[-p247]
[ruby-]2.0.0-head
ruby-head
Already tried to reinstall RVM with rm -rf all configs - didn't help, the problem persists.
What's the proper way to install ruby through RVM in Ubuntu?!
Also done sudo chown -R unik:unik /home/unik/.rvm, installed all necessary packages recommended here. Any tries to explicitly throw p247 gives nothing.
ok, thanks. Really ruby-lang.org is down

Installing Thrift on CentOS: can't find Boost 1.40 or higher

I can't shake this error when trying to install Thrift:
./configure
...
checking for boostlib >= 1.40.0... configure: WARNING: We could not detect the boost libraries (version 1.40 or higher). If you have a staged boost library (still not installed) please specify $BOOST_ROOT in your environment and do not give a PATH to --with-boost option. If you are sure you have boost installed, then check your version number looking in <boost/version.hpp>. See http://randspringer.de/boost for more documentation.
I'm using CentOS. As per the Thrift docs on CentOS, I've done
sudo yum install automake libtool flex bison pkgconfig gcc-c++ boost-devel libevent-devel zlib-devel python-devel ruby-devel
I've tried using --with-boost to no avail.
I've also done:
[]# yum install boost141
Setting up Install Process
Package boost141-1.41.0-2.el5.x86_64 already installed and latest version
Nothing to do
[]# yum install boost141-devel
Setting up Install Process
Package boost141-devel-1.41.0-2.el5.x86_64 already installed and latest version
Package boost141-devel-1.41.0-2.el5.i386 already installed and latest version
Nothing to do
So now I have:
[root#domU-12-31-39-18-3D-20 include]# find / -name boost
/usr/local/bin/boost
/usr/include/boost141/boost
/usr/include/boost
Through various googling, I've found people with this error who say, 'Oh it was gcc-c++, I didn't have that installed,' but as far as I can tell, I have gcc-c++ installed:
[root#domU-12-31-39-18-3D-20 boost]# yum install gcc-c++
rightscale-epel | 951 B 00:00
Setting up Install Process
Package gcc-c++-4.1.2-46.el5_4.2.x86_64 already installed and latest version
Nothing to do
Any advice? Thanks in advance.
This is an old question, but I recently hit the same thing working with a Cent 5.10 machine and building Thrift
Fixup the include files for boost141 and the build will work.
ln -s /usr/include/boost141/boost /usr/include/boost

Resources