Installing mb data dumps

I got into some trouble following the install instructions for the musicbrainz-server.

I mainly want to poke at the postgresql data myself, and don’t really need the whole server itself.

Anyway, I ran into problems running the InitDb.pl script.
At first I got this:
Can’t locate JSON.pm in @INC (you may need to install the JSON module) …

So I ran cpan JSON.
I also had to cpan Moose.

Now I have this error:
Can’t locate package Throwable::Error for @MusicBrainz::Server::Exceptions::InvalidInput::ISA at /usr/local/lib/x86_64-linux-gnu/perl/5.22.1/Class/MOP/Class.pm line 957.
You can only consume roles, Throwable is not a Moose role at /usr/local/lib/x86_64-linux-gnu/perl/5.22.1/Moose/Exporter.pm line 419
Moose::with(‘Throwable’) called at /home/simon/musicbrainz/musicbrainz-server/admin/…/lib/MusicBrainz/Server/Exceptions.pm line 21
require MusicBrainz/Server/Exceptions.pm at /home/simon/musicbrainz/musicbrainz-server/admin/…/lib/MusicBrainz/Server/Connector.pm line 3
MusicBrainz::Server::Connector::BEGIN at /home/simon/musicbrainz/musicbrainz-server/admin/…/lib/MusicBrainz/Server/Exceptions.pm line 0
eval {…} at /home/simon/musicbrainz/musicbrainz-server/admin/…/lib/MusicBrainz/Server/Exceptions.pm line 0
require MusicBrainz/Server/Connector.pm at /usr/share/perl5/Module/Runtime.pm line 317
Module::Runtime::require_module(‘MusicBrainz::Server::Connector’) called at /usr/local/share/perl/5.22.1/Class/Load.pm line 174
Class::Load::try {…} at /usr/share/perl5/Try/Tiny.pm line 88
eval {…} at /usr/share/perl5/Try/Tiny.pm line 83
Try::Tiny::try(‘CODE(0x355dc90)’, ‘Try::Tiny::Catch=REF(0x3648d90)’) called at /usr/local/share/perl/5.22.1/Class/Load.pm line 180
Class::Load::try_load_class(‘MusicBrainz::Server::Connector’, undef) called at /usr/local/share/perl/5.22.1/Class/Load.pm line 35
Class::Load::load_class(‘MusicBrainz::Server::Connector’) called at /home/simon/musicbrainz/musicbrainz-server/admin/…/lib/MusicBrainz/Server/DatabaseConnectionFactory.pm line 39
MusicBrainz::Server::DatabaseConnectionFactory::get_connection(‘MusicBrainz::Server::DatabaseConnectionFactory’, ‘SYSTEM’) called at admin/InitDb.pl line 70
main::RequireMinimumPostgreSQLVersion at admin/InitDb.pl line 517
Compilation failed in require at /home/simon/musicbrainz/musicbrainz-server/admin/…/lib/MusicBrainz/Server/Connector.pm line 3.
BEGIN failed–compilation aborted at /home/simon/musicbrainz/musicbrainz-server/admin/…/lib/MusicBrainz/Server/Connector.pm line 3.
Compilation failed in require at /home/simon/musicbrainz/musicbrainz-server/admin/…/lib/MusicBrainz/Server/DatabaseConnectionFactory.pm line 39.
MusicBrainz::Server::DatabaseConnectionFactory::get_connection(“MusicBrainz::Server::DatabaseConnectionFactory”, “SYSTEM”) called at ./admin/InitDb.pl line 70
main::RequireMinimumPostgreSQLVersion() called at ./admin/InitDb.pl line 517

Any ideas? I’m don’t usually use perl so not sure where to start on this. The machine is running Ubuntu 16.04.

I just found the mbslave project, so maybe this would be more suitable.

If you want to run the server see the instructions in INSTALL.md
There is a list of dependencies that the server needs, some of these can be downloaded through apt and some are downloaded through cpan.

Run the following to get these dependencies.
cpanm --installdeps --notest .

You will also need to set some variables in your environement so it then loads these dependencies.
have the following in your .bashrc so that it is set when you need it.
eval $( perl -Mlocal::lib )

I have a musicbrainz server install and am running mbslave to keep the database up to date.
I think you should be able to use just mbslave to set up the data model but I am not sure.

I am also stuck in the same issue. Need some help.