mariadb with rails: can't install libmysqlclient-dev - ruby-on-rails

I have mariadb-10.1 installed on a stock 64bit Ubuntu 15:10.
I have libmysqlclient18 succesfully installed, but I get errors when trying to install libmysqlclient-dev.
steve#steve:~$ dpkg -s libmysqlclient18
Package: libmysqlclient18
Status: install ok installed
Priority: optional
Section: libs
Installed-Size: 10
Maintainer: MariaDB Developers <maria-developers#lists.launchpad.net>
Architecture: amd64
Source: mariadb-10.1
Version: 10.1.13+maria-1~wily
Replaces: libmysqlclient18 (<< 10.1.13+maria-1~wily)
Depends: libmariadbclient18 (= 10.1.13+maria-1~wily)
Description: Virtual package to satisfy external depends
This is an empty package that provides an updated "best" version of
libmysqlclient18 that does not conflict with the libmariadbclient18
package.
.
MariaDB is a fast, stable and true multi-user, multi-threaded SQL database
server. SQL (Structured Query Language) is the most popular database query
language in the world. The main goals of MariaDB are speed, robustness and
ease of use.
Homepage: http://mariadb.org/
steve#steve:~$ sudo apt-get install libmysqlclient-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies.
libmysqlclient-dev : Depends: libmysqlclient18 (= 5.6.28-0ubuntu0.15.10.1) but 10.1.13+maria-1~wily is to be installed
E: Unable to correct problems, you have held broken packages.
Can anyone suggest how to resolve this?
Thanks :-)
Steve

You have to install libmariadbclient-dev instead of libmysqlclient-dev when using MariaDB
sudo apt-get install libmariadbclient-dev

While installing libmariadbd-dev or libmariadbclient-dev package is the easiest way, in some OS's or package managers it is not available.
For example on a mac with homebrew this is not available, I found a workaround though.
To install gem mysql2 on a mac you need mariadb-connector-c in homebrew. This package conflicts with Mariadb symlinks so you need to do run the following in the terminal:
brew unlink mariadb
brew install mariadb-connector-c
Inside the rails project directory, execute:
bundle install (or gem install mysql2)
brew uninstall mariadb-connector-c
brew link mariadb

Related

Unable to install Phusion Passenger on Ubuntu Server 18.04

Running on a fresh install of Ubuntu Server 18.04 on Virtualbox, Windows 10 as the host OS. Ran the instructions on the Phusion Passenger site here
This is the error I'm getting:
steve#heartypet-staging:~$ sudo apt-get install -y libnginx-mod-http-passenger
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libnginx-mod-http-passenger : Depends: passenger (= 1:5.3.4-1~bionic1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Oddly enough, the exact same instructions work fine on the desktop version.
Get default source list from here
https://askubuntu.com/a/1036749
Replace /etc/apt/source.list with the file in the link above.
Then sudo apt update and sudo apt upgrade
And go ahead...
If you having problems with the previous solution, one option is run this command:
sudo nano /etc/apt/sources.list.d/passenger.list
and comment all the lines in this file, then run the command
sudo apt-get install passenger

how can i install rmagick on ubuntu 17.04

Installing rmagick on Ubuntu
there are solutions for different versions of ubuntu, but none worked on 17.04 ?
sudo apt-get install libmagickwand-dev gives
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libmagickwand-dev : Depends: imagemagick-6-common (= 8:6.9.7.4+dfsg-3ubuntu1) but 8:6.9.7.4+dfsg-3ubuntu1.2 is to be installed
Depends: libmagickwand-6.q16-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Couldn't find any solution for this. Updated to Ubuntu to 17.10, where it works fine.
You can search for any packages in ubuntu doing a sudo apt-cache search libmagickwand-dev and if you find the package you are looking for then install it doing sudo apt-get install libmagickwand-dev,
Installing all the unmet dependencies should fix the problem, and it is always helpful to do the commands below to upgrade any missing packages
sudo apt-get upgrade && sudo apt-get update
You should be able to install rmagick without any issues after this.

Cant install ruby-switch for ruby on rails

I am trying to install ruby on rails on Ubuntu via bright box. I've installed:
sudo apt-get install software-properties-common
sudo apt-add-repository ppa:brightbox/ruby-ng
sudo apt-get update
sudo apt-get install ruby ruby-dev
But when I try to install this:
sudo apt-get install ruby-switch
I get this error:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package ruby-switch is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'ruby-switch' has no installation candidate
What is the problem, and how to solve it?
It doesn't look like ruby-switch is available anymore. That's what apt-get is informing you of.
If you're looking for a way to manage the versions of Ruby, then there is rbenv or RVM available instead. These two approaches are more standard and widely accepted as good ways to switch between Ruby version - but pick only one.

Installing ROS Indigo on Ubuntu 14.04.2

System Information:
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.2 LTS
Release: 14.04
Codename: trusty
Error message we get:
The following packages have unmet dependencies:
ros-indigo-desktop-full : Depends: ros-indigo-desktop but it is not going to be installed
Depends: ros-indigo-perception but it is not going to be installed
Depends: ros-indigo-simulators but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
If I explore the error message further, this is what I get:
ros-indigo-cpp-common : Depends: libconsole-bridge0.2 but it is not installable
Depends: libboost-all-dev but it is not installable
Depends: libconsole-bridge-dev but it is not installable
I have successfully installed ROS Indigo on Ubuntu 14.04. So be assured that it can be done.
I have seen many of these errors when installing ROS packages. There seems to be some error in the package management system in Ubuntu (aptitude). You may try
sudo apt-get update
sudo apt-get install -f
If it doesn't work, try to manually install some dependencies by
sudo apt-get install ros-indigo-simulators
sudo apt-get install ros-indigo-perception
Hope it helps.
My suggestion would be to delete the old installation as manual installations of dependencies may be too much. I have written a complete end to end blog on the installation of ROS Indigo over Ubuntu 14.04.
For those whom still had problems after trying everything.
I have tracked dependencies and found out that the problem is libboost, I had the version 1.55 but some of ros-indigo modules require the 1.54 version
Try these commands
sudo apt-get install libboost1.54-tools-dev
sudo apt-get install libboost-tools-dev
sudo apt-get install libboost-mpi-python1.54.0
sudo apt-get install libboost-mpi-python1.54-dev
sudo apt-get install libboost-mpi-python-dev
then you can finally
sudo apt-get install ros-indigo-desktop-full
Hope this helps

cant install rails in ubuntu 9.10 in my eee pc

i am trying to install rails in my eee pc with the last version of ubuntu and i have some package that are told installable.how is it possible?i can even install gem
fenec#fenec-laptop:~$ gem
The program 'gem' can be found in the following packages:
* rubygems1.8
* rubygems1.9.1
Try: sudo apt-get install <selected package>
gem: command not found
root#fenec-laptop:/home/fenec# apt-get install rubygems1.8
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package rubygems1.8 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package rubygems1.8 has no installation candidate
Is it possible that some package are not installable due to my hardware? I have this problem only with this version of ubuntu i used to have ubuntu 8.10 and rails was working like a charm.
I usually install ruby gems from source. I would try following this guide - it's worked for me on multiple different Ubuntu installs.
See: https://help.ubuntu.com/community/RubyOnRails

Resources