Boost C++ Serialization lib missing in xubuntu installation - boost

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.

Related

How to install a newer version of Ruby than what is present in the package manager?

I'm using "yum" which has a very old version of Ruby. I'm on linux OS and quite new to it. How can I install a specific version of Ruby that isn't present in the package installer?
Note: I don't have the other package managers (rbenv / rmv etc).
Note2: I am connected to this Linux machine via putty. So I only have command-line access.
Without package managers and using yum, your last option is to build from source.
Building from Source
Of course, you can install Ruby from source.
Download and unpack a tarball (EG: Ruby 3.0.2), then just do this:
$ ./configure
$ make
$ sudo make install
By default, this will install
Ruby into /usr/local. To change, pass the --prefix=DIR option to the
./configure script.
REF: https://www.ruby-lang.org/en/documentation/installation/#building-from-source

Packages apt-get vs brew?

Im trying to get something running in a lab, and I need to install a whole bunch of packages to compile the code:
sudo apt-get install build-essential libgtk2.0-dev libwxgtk3.0-dev libwx-perl libmodule-build-perl git cpanminus libextutils-cppguess-perl libboost-all-dev libxmu-dev liblocal-lib-perl wx-common libopengl-perl libwx-glcanvas-perl libtbb-dev libxmu-dev freeglut3-dev libwxgtk-media3.0-dev libboost-thread-dev libboost-system-dev libboost-filesystem-dev libcurl4-openssl-dev libextutils-makemaker-cpanfile-perl
The problem is, I'm working on a Mac; So I only have brew available - and the package names are not equivalent.
Am I trying to do something dumb and impossible, or is there a way to cross reference those apt-get packages to ones available in brew and install those so I can build the app?
For added context, its a modified "slicer" application for generating files that a 3d printer uses to make parts. I could fire up an ubuntu VM and use apt-get, but I'm on an M1 mac at the moment and recompiling experimental QEMU code just so I can fire up an ubuntu VM takes me way more out of my depth than I already am... I'm running brew on a duplicated, rosetta emulation forced terminal.
There is no straightforward way to automatically figure out whether a corresponding Homebrew package exists for each of these packages, no. But you can probably guess the majority, and manually figure out the rest. Each Debian package has a link to the upstream sources, and a home page if one exists, from which you can often find links to packages for other architectures, etc.
From the Debian package search page you can search e.g. for the libxmu-dev package, and discover the corresponding package page for Buster (the current stable Debian release), which in turn has links to the upstream repo, etc. But this is an X11 package, so it's not straightforwardly compatible with macOS, which uses an entirely different GUI architecture.

How to install an external package to /usr/local without troubling Homebrew?

I'm trying to install a package called Geant4 by compiling from source (HomeBrew actually has the package but it's an old version and doesn't have support for Python which I need).
I want to put the Geant4 package in /usr/local/geant4 (perhaps this is not the proper place to put it in OSX?).
Now, the Homebrew FAQ has some instructions on how to install external stuff, but when I do brew diy, I get the error message:
Error: Couldn't determine build system
The command I should use to configure Geant4 is:
cd ~/my-build-directory
cmake -DCMAKE_INSTALL_PREFIX=/usr/local/geant4 ~/Downloads/geant4.10.01.p01
brew diy makes a good effort to determine how to build a package, but it doesn't always get it right. In the case of custom packages, it's probably best to install them into $(brew --prefix)/Cellar/$package/$version, just as Homerew would -- that way, you can interact with the package using brew link, etc. You can also install it to /usr/local or anywhere you like, but mimicking Homebrew works really well.
In your case, you could probably install it with something like:
cd /my-build-directory
cmake -DCMAKE_INSTALL_PREFIX=$(brew --prefix)/Cellar/geant4/10.01.p01 ~/Downloads/geant4.10.01.p01
brew link geant4

Stand alone package installing for ActivePerl

I have a standard installation of ActivePerl. I need to install the package that is not included to the installation.
Is there any way to install the package without using ppm / CPAN? (it is supposed to be installed as part of other program)
NOTE: It supposed to work under Windows
A Perl package is an ephemeral store of subroutines and package variables in memory. Perhaps you mean a Perl distribution?
First, install cpanm if you don't already have it.
cpan App::cpanminus
Yes, this works on Windows. No, you don't have to install a compiler. cpan will do that for you if necessary.
Then, install the distribution by passing its file name to cpanm. For example,
cpanm IPC-System-Simple-1.21.tar.gz
This will perform the required configuration, install the indicated prerequisites, prepare the distribution's content for installation (e.g. by building any files that need building), run the distribution's tests and install the distribution.

How can I force Homebrew to install 64-bit PostgreSQL on OSX SL? Specifically the libpg.dylib file

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 :)

Resources