I'm trying to compile Boost with the zlib package built into Ubuntu, but it cannot find it and thus gives me a zlib : no upon running ./b2.
I definitely have it installed, as dpkg -L zlib1g-dev and dpkg -L zlib1g give me their locations.
I've tried manually passing in the directories as command-line options as suggested here, and I've also tried creating a user-config.jam file as suggested here, but nothing has worked.
Any ideas as to what might be the problem?
For unclear reasons, the solution was just to get rid of everything in the Boost directory and recompile + reinstall Boost. After that it was able to find zlib (and bzip2) without any problems.
Related
I'm trying to install ruby 2.8.0-dev through asdf with asdf install ruby 2.8.0-dev but I get the following error:
Cloning https://github.com/ruby/ruby.git...
Installing ruby-master...
BUILD FAILED (Ubuntu 20.04 using ruby-build 20200401)
Inspect or clean up the working tree at /tmp/ruby-build.20200523221649.37283.rxnWxu
Results logged to /tmp/ruby-build.20200523221649.37283.log
Last 10 log lines:
/tmp/ruby-build.20200523221649.37283.rxnWxu ~
Cloning into 'ruby-master'...
/tmp/ruby-build.20200523221649.37283.rxnWxu/ruby-master /tmp/ruby-build.20200523221649.37283.rxnWxu ~
/home/carlos/.asdf/plugins/ruby/ruby-build/bin/ruby-build: line 622: autoconf: command not found
I'm on Ubuntu 20.04
I've googled this but didn't found any useful info.
Best regards.
First, some general advice how you can solve this issue yourself, without having to come to [so] and waiting for someone else to solve your problem:
Computers are very good at searching. So, in 90% of cases, when a computer tells you that it couldn't find something, it is because that thing isn't there.
So, the first thing I would check, if I were in your situation, is whether the thing the computer tells me it can't find is actually there. In particular, I would check whether I have autoconf installed.
In the other 10% of cases, the thing the computer is looking for is there, but it is not somewhere the computer is looking. So, the second thing I would check is whether autoconf is in the $PATH.
Pretty much always, following those two steps solves the problem for me.
Now, on to your particular problem: when you want to compile some piece of software, you need the corresponding tools. Those tools include, but are not limited to, a compiler for the language the software is written in (in this case C), a build tool (in this case Make), the header files for all the libraries the software uses (in this case for example libyaml, zlib, OpenSSL), maybe some configuration tools (in this case autoconf). YARV also uses Bison to generate its parser.
Often, those required tools are listed in the developer or contributor documentation of the software. Although sometimes, it is just assumed that people who install software by compiling directly from source are clever enough to figure out which tools they need on their own. For YARV, there is documentation about the requirements for running the testsuite, which implicitly also requires building the code in the first place.
Debian-based Linux Distributions (Debian, Ubuntu, Mint, etc.) have a handy meta-package called build-essential that depends on some of the most important tools, e.g. gcc and make as well as the dpkg-dev metapackage (which in turn depend on lots of other packages).
The ASDF Ruby plugin actually uses ruby-build under the hood, and the documentation directly links to the system requirements, which list the following:
apt install autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm6 libgdbm-dev libdb-dev
I ran into a similar issue and this fixed it for me.
In short, run:
sudo apt-get install autoconf bison build-essential libssl-dev libyaml-dev libreadline6 libreadline6-dev zlib1g zlib1g-dev
UPDATE: Solved with the solution here
I have spent the better part of my day trying to get ImageMagick to work with Grunt, with no luck. Grunt seems to be okay, but ImageMagick not so much, even though I've run the test on ImageMagick.org to make sure that it's installed correctly (I used HomeBrew for the install).
I get this error when trying to run a task:
Warning: Command failed: identify: unable to load module
'/usr/local/Cellar/imagemagick/6.9.2-4/lib/ImageMagick//modules-
Q16/coders/jpeg.la': file not found # error/module.c/OpenModule/1300.
identify: no decode delegate for this image format 'JPEG' #
error/constitute.c/ReadImage/501.
I've tried the solutions here and here, but none of them have helped.
(FYI I'm new to using the command line.)
Help?
As with any homebrew problem, I would suggest you run
brew doctor
first, to try and sort things out. It is an excellent diagnosis tool.
Now, to your specific problem... mmmm... the /opt/X11 part of your error message worries me because homebrew installs in /usr/local/bin and /usr/local/Cellar so your ImageMagick should not be looking anywhere in /opt at all. I guess you have installed freetype via MacPorts or some method other than homebrew.
I would suggest you install the freetype stuff using homebrew, i.e.
brew install freetype
Then I would suggest uninstalling any other freetype stuff you have installed any other way. Finally, I would suggest you check your PATH environment variable and make it point to /usr/local/bin before anything in /opt. You will need to log out and back in for the new PATH to take effect - you can check your PATH like this:
echo $PATH
and change it by editing $HOME/.profile if you need to.
The homebrew version of freetype provides version 19 of the library and is therefore compatible with the homebrew ImageMagick version.
Also, I am a little disconcerted by the X11 part in your error message - modern Macs don't really use X11 any more and it doesn't ship with OSX. Let's see if the above ideas sort you out before worrying about that too much though - unless you know, and can say for sure, that you need X11.
I have xubuntu OS installed on my PC (12.04, Precise Pangolin) and installed C++ boost lib (1.49) using ubuntu's binary repository for boost by issuing the following command in the terminal:
sudo apt-get install libboost-dev
The command completed successfully and now I need to use boost serialization lib which is named libboost_serialization for my application. However, I cannot find this in any location under /usr/ in my file system and I wonder why this lib has not been installed automatically when I issued the above apt-get command. Am I supposed install another package separately to get boost serialization library in place in my xubuntu installation? Thanks.
You probably want this package: http://packages.ubuntu.com/precise/libboost-serialization-dev.
If you want all Boost sub-packages installed in one operation, you also have a libboost-all-dev package.
I have been trying to install the Ruby PG gem, but kept getting the "Failed to build gem native extension." error.
After sifting through a lot of google results, I tried nearly every recommendation I came across, all without luck. However, I believe I've tracked down the source of the problem ... Homebrew.
Homebrew installed PostgreSQL 9.0.4, but only with the 32-bit libraries. As I am running Snow Leopard (10.6.8) with XCode 3.26, I need the 64-bit libraries in order to compile everything without library mismatch errors. But I cannot seem to find out how to force Homebrew to install them, even with ARCHFLAGS and ENV set to "-arch x86_64".
Suggestions, please :)
p.s. I found out that I only had 32-bit libraries installed by running:
file /usr/local/Cellar/postgresql/9.0.4/lib/libpq.5.3.dylib
which returned:
/usr/local/Cellar/postgresql/9.0.4/lib/libpq.5.3.dylib: Mach-O dynamically linked shared library i386
Update: re-installed Homebrew, which installed postgresql/9.1.1 and 64-bit shared libraries.
But another problem emerged, while installing the PG gem. For some reason it was looking for ginstall in /opt/local/bin. As I had removed MacPorts, that directory was also removed. I did find this solution:
mkdir -p /opt/local/bin/
sudo ln -s /usr/bin/install /opt/local/bin/ginstall
And now everything seems to be working ....
So it looks like my first install, using Homebrew, must have been done with regular Leopard.
Removing the Homebrew "Cell" directory and all of its contents, running the install script again, then doing "brew install" and "brew update" with all needed packages, got me the latest version of PostgreSQL, with 64-bit developer library.
And creating the above symbolic link fixed any left over errors from the MacPorts removal.
Now all is well :)
I am trying to install gcc 4.6 (mainly for having C++0x better supported) in my ubuntu 9.10 (via virtualbox). I referred to previous questions, but I am getting a different error.
I am referring this link for the installation. Now, I have done till the ./gcc-xx/configure ... step. Though it was giving some flex package related error. Mostly due to that make is also failing with below errors:
build/gengtype.o: In function
adjust_field_rtx_def':
/home/milind/ubuntu_shared/GCC/build/gcc/../../gcc-4.6-20110610/gcc/gengtype.c:978:
undefined reference tolexer_line'
/home/milind/ubuntu_shared/GCC/build/gcc/../../gcc-4.6-20110610/gcc/gengtype.c:1032:
undefined reference to lexer_line'
/home/milind/ubuntu_shared/GCC/build/gcc/../../gcc-4.6-20110610/gcc/gengtype.c:1042:
undefined reference tolexer_line' ...............
Now this is giving me a hard time figuring it out because I have already flex/bison latest versions installed. I searched over internet for 2 days almost but no luck. Any help would be really appreciated. Also note that, I already have gcc 4.4 installed in /usr/bin/gcc and I have unzipped the gcc 4.6 tar in my home directory local folder.
[Note: I am also ok with installing ubuntu 11.10 too (which has gcc 4.6) as last resort. But I don't know if its .iso image is available.]
I got this fixed. I followed following procedure:
[Note: run all the commands with sudo, if you are not login as root. e.g. sudo ls -ltr; sudo make install;
As mentioned in the link in my
question, download the gcc4.6...tar
file in a temporary place
Now find the place where current
gcc is stored. e.g. My earlier
gcc4.4 was stored in
/usr/lib/gcc/i486-linux-gnu. Which
has a folder called 4.4, 4.4.1
Create a folder named 4.6 (or
4.6.1/2/3 etc.) and put that
.tar file inside it. Untar the
file as shown in link.
Follow all the procedure as per the
link. Use nohup <command> & to
track the logs. i.e. nohup make
clean all & followed by tail -f
nohup.out
If some error comes, it means some
package is missing. Mostly those
package will be present in your
current gcc version. You can
install them there itself. For
example, in my case zlib was
missing. I ran sudo apt-get install
zlib1g-dev libssl-dev and it worked
fine. Otherwise download from internet and install it.
Once your gcc is installed, you
can simply check it using type
gcc-4.6. In my case it showed that
it's stored as
/usr/local/bin/g++-4.6.
Either you can use the same path to
compile or you can put an alias in
your bash/tcsh/ksh. e.g.
/usr/local/bin/g++-4.6 -std=c++0x
-Wall test.cpp
FWIW Debian testing and unstable have gcc-4.6 as a standard package. So you can simply install that distro inside of virtualbox or, as I've done on my Ubuntu 11.04 server at home, via kvm. In the past, I also used to use dchroot build environments.
There may also be prepackaged gcc-4.6 binaries at launchpad.