monitor-merlin icon indicating copy to clipboard operation
monitor-merlin copied to clipboard

make install bug?

Open SeLLeRoNe opened this issue 8 years ago • 2 comments

Hi everyone, I was playing around with a fresh install of Merlin and i noticed something wrong.

On "make install" i received this error:

bash install-merlin.sh
install-merlin.sh: line 45: /usr/local/monitor/share/merlin/sql/mysql/merlin.sql: No such file or directory
ERROR 1146 (42S02) at line 1: Table 'monitor_db.db_version' doesn't exist
install-merlin.sh: line 65: /usr/local/monitor/share/merlin/sql/mysql/*-indexes.sql: No such file or directory
make[3]: *** [install-exec-hook] Error 1
make[3]: Leaving directory `/usr/local/crazynetwork/monitor/merlin'
make[2]: *** [install-exec-am] Error 2
make[2]: Leaving directory `/usr/local/crazynetwork/monitor/merlin'
make[1]: *** [install-am] Error 2
make[1]: Leaving directory `/usr/local/crazynetwork/monitor/merlin'
make: *** [install] Error 2

I checked the install-merlin.sh script and is looking for the wrong folder, in fact, instead of looking on the current path (pwd/sql/mysql/), it is looking for the path where the make install it is supose to put the files:

prefix=/usr/local/monitor
exec_prefix=${prefix}
sqldir=${prefix}/share/merlin/sql

That folder (/usr/local/monitor/share/merlin/sql/) still doesn't exist at that moment, in fact, if i manually import the .sql scripts and create the DB structure, the make install success and than the folder (/usr/local/monitor/share/merlin/sql/ exist.

Please note i used just those commands:

./configure --prefix=/usr/local/monitor --with-naemon-user=monitor --with-naemon-group=monitor --with-db-type=mysql--with-db-name=monitor_db --with-db-user=monitor_db --with-db-pass=mypassword --with-initdirectory=/etc/init.d
make
make install

Also please note this, in the install-merlin.sh file i can see those DB settings:

db_type=mysql--with-db-name=monitor_db
db_name=merlin
db_user=monitor_db
db_pass=mypassword

As you can see, despite the fact i specified the db_name on the ./configure, it still show merlin, it doesn't look like it is actually using that (i can tell from the error which specify the correct DB), but maybe can be fixed anyway :)

Best regards Andrea

SeLLeRoNe avatar Dec 21 '16 16:12 SeLLeRoNe

Hi Andrea, I got the same issue exactly. You need manually copy the folder sql from setup folder prior to run 'make install'. I did this:

[root@centos merlin]# mkdir /opt/monitor/merlin/share/merlin/ -pv mkdir: created directory /opt/monitor/merlin/share' mkdir: created directory /opt/monitor/merlin/share/merlin/' [root@centos merlin]# cp -r sql/ /opt/monitor/merlin/share/merlin/ [root@centos merlin]# make install

geekmichael avatar Jul 07 '17 06:07 geekmichael

Hi Michael,

Thanks for that, I guess that would be better for devs to fix this minor thing, anyway I did manage to make the installation as I wrote, so it's not big harm anymore :)

Thanks

SeLLeRoNe avatar Jul 07 '17 10:07 SeLLeRoNe