Can not Install Postal
Hello Postal Team,
I have install Postal with Quick instantiation on Ubuntu 16.04 OVH server.
But I have Received these error:-
Could not find mysql2-0.4.10 in any of the sources
Run bundle install to install missing gems.

Please help me.
Thank You
Make sure you have all the prerequisites
Yes, I have install all prerequisites.
root@server:~# sudo apt install software-properties-common Reading package lists... Done Building dependency tree Reading state information... Done software-properties-common is already the newest version (0.96.20.9). 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. root@server:~# sudo apt-add-repository ppa:brightbox/ruby-ng Next generation Ubuntu packages for Ruby 2.6, 2.5, 2.4, 2.3, 2.2, 2.1, 2.0 1.9.3 and 1.8.
See https://www.brightbox.com/docs/ruby/ubuntu/ for more details.
Discussion list here:
https://groups.google.com/forum/#!forum/brightbox-ruby-ubuntu-packaging
https://www.brightbox.com More info: https://launchpad.net/~brightbox/+archive/ubuntu/ruby-ng Press [ENTER] to continue or ctrl-c to cancel adding it
gpg: keyring /tmp/tmpjogcfkox/secring.gpg' created
gpg: keyring /tmp/tmpjogcfkox/pubring.gpg' created
gpg: requesting key C3173AA6 from hkp server keyserver.ubuntu.com
gpg: /tmp/tmpjogcfkox/trustdb.gpg: trustdb created
gpg: key C3173AA6: public key "Launchpad PPA for Brightbox" imported
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)
OK
root@server:~# sudo apt update
Hit:2 http://nova.clouds.archive.ubuntu.com/ubuntu xenial InRelease
Hit:3 http://security.ubuntu.com/ubuntu xenial-security InRelease
Hit:4 http://mirrors.coreix.net/mariadb/repo/10.1/ubuntu xenial InRelease
Hit:5 http://ppa.launchpad.net/brightbox/ruby-ng/ubuntu xenial InRelease
Hit:6 http://nova.clouds.archive.ubuntu.com/ubuntu xenial-updates InRelease
Get:7 http://nova.clouds.archive.ubuntu.com/ubuntu xenial-backports InRelease [107 kB]
Hit:1 https://www.rabbitmq.com/debian testing InRelease
0% [7 InRelease gpgv 107 kB]
Fetched 107 kB in 0s (138 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
root@server:~#
root@server:~# sudo apt install ruby2.3 ruby2.3-dev build-essential
Reading package lists... Done
Building dependency tree
Reading state information... Done
build-essential is already the newest version (12.1ubuntu2).
ruby2.3 is already the newest version (2.3.8-4bbox1~xenial1).
ruby2.3-dev is already the newest version (2.3.8-4bbox1~xenial1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@server:~# sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8
Executing: /tmp/tmp.CfZKhy7Cca/gpg.1.sh --recv-keys
--keyserver
hkp://keyserver.ubuntu.com:80
0xF1656F24C74CD1D8
gpg: requesting key C74CD1D8 from hkp server keyserver.ubuntu.com
gpg: key C74CD1D8: "MariaDB Signing Key [email protected]" not changed
gpg: Total number processed: 1
gpg: unchanged: 1
root@server:~# sudo add-apt-repository 'deb [arch=amd64,i386,ppc64el] http://mirrors.coreix.net/mariadb/repo/10.1/ubuntu xenial main'
root@server:~# sudo apt update
Hit:2 http://security.ubuntu.com/ubuntu xenial-security InRelease
Hit:3 http://mirrors.coreix.net/mariadb/repo/10.1/ubuntu xenial InRelease
Hit:4 http://ppa.launchpad.net/brightbox/ruby-ng/ubuntu xenial InRelease
Hit:5 http://nova.clouds.archive.ubuntu.com/ubuntu xenial InRelease
Hit:1 https://www.rabbitmq.com/debian testing InRelease
Hit:6 http://nova.clouds.archive.ubuntu.com/ubuntu xenial-updates InRelease
Get:7 http://nova.clouds.archive.ubuntu.com/ubuntu xenial-backports InRelease [107 kB]
Fetched 107 kB in 0s (147 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
root@server:~# sudo apt install mariadb-server libmysqlclient-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
libmysqlclient-dev is already the newest version (5.7.28-0ubuntu0.16.04.2).
mariadb-server is already the newest version (10.1.43+maria-1~xenial).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@server:~# curl -sL https://www.rabbitmq.com/rabbitmq-release-signing-key.asc | sudo apt-key add -
OK
root@vps758088:~# sudo add-apt-repository 'deb http://www.rabbitmq.com/debian/ testing main'
root@vps758088:~# sudo apt update
Hit:2 http://security.ubuntu.com/ubuntu xenial-security InRelease
Hit:3 http://mirrors.coreix.net/mariadb/repo/10.1/ubuntu xenial InRelease
Hit:4 http://ppa.launchpad.net/brightbox/ruby-ng/ubuntu xenial InRelease
Hit:5 http://nova.clouds.archive.ubuntu.com/ubuntu xenial InRelease
Hit:1 https://www.rabbitmq.com/debian testing InRelease
Hit:6 http://nova.clouds.archive.ubuntu.com/ubuntu xenial-updates InRelease
Get:7 http://nova.clouds.archive.ubuntu.com/ubuntu xenial-backports InRelease [107 kB]
Fetched 107 kB in 0s (144 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
root@server:~# sudo apt install rabbitmq-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
rabbitmq-server is already the newest version (3.6.15-1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@server:~# sudo apt install nodejs
Reading package lists... Done
Building dependency tree
Reading state information... Done
nodejs is already the newest version (4.2.6~dfsg-1ubuntu4.2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@server:~# sudo apt install git
Reading package lists... Done
Building dependency tree
Reading state information... Done
git is already the newest version (1:2.7.4-0ubuntu1.6).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
I encountered the same error today.
An error occurred while installing mysql2 (0.4.10), and Bundler cannot
continue.
Make sure that gem install mysql2 -v '0.4.10' --source 'https://rubygems.org/'
succeeds before bundling.
In Gemfile: mysql2
In my experience, it seems to be quite easy for gems to go awry so installing the missing gem directly, as implied by the original error, would be the solution.
If the gem cannot be installed, it will tell you what else is missing from your system.
Yeah, the issue is, that it interrups the quick install script and there is no way to continue.
I have reinstall my server and i got this error:-
root@server:~# postal start
Could not find acme-client-2.0.0 in any of the sources
Run bundle install to install missing gems.
Please help me on this.
Thank You
mysql2 gem failed for me too, and installing libmysqlclient-dev wasn't enough either. I've had to
apt-get install libnetcdf-dev libssl-dev libcrypto++-dev libgmp-dev
not sure which was the one required though :p
Thanks for the steer @chaumo.
@zeba121 @jos0405 you can try running postal bundle /opt/postal/vendor/bundle to see if you get any errors and if you do, you'll need to install more system libraries to install all the required gems.
Hello @willpower232
I have tried this postal bundle /opt/postal/vendor/bundle but error is still now. Seen the given pastebin link:-
https://pastebin.com/EcpC8tK8
Can we remove mysql2.0.4.10 Because the server is accepting mysql2.0.5.2
I have run this command gem install mysql2.
Then Output is :- https://pastebin.com/fUXGNpe1
@zeba121 have you tried what @chaumo said? https://github.com/postalhq/postal/issues/921#issuecomment-558648734
Hello Postal Team,
I have fix this issue.
Thank You
@zeba121 what did you do? :)
please check the following commands:-
adduser Postal passwd Postal vim /etc/sudoers postal ALL=(ALL:ALL) ALL su Postal gem install -g mysql2 -v '0.4.10' apt-get install libmysqlclient-dev && apt-get install libnetcdf-dev libssl-dev libcrypto++-dev libgmp-dev && apt-get install ruby-mysql2 && postal bundle /opt/postal/vendor/bundle exit postal initialize-config postal initialize postal start su Postal postal bundle /opt/postal/vendor/bundle exit postal initialize
i have manually installed mysql2.4.10 & bundle pakages.