Problem:I am trying to re-compile the code of Airwave and it fails with the below error.
root@amp-lab### make
/opt/airwave/bin/perl -I/root/svn/mercury/lib/perl /root/svn/mercury/scripts/cluster_role postgres_slave || /opt/airwave/bin/perl -I/root/svn/mercury/lib/perl /root/svn/mercury/scripts/cluster_role alc || /root/svn/mercury/scripts/db_down || perl -Ilib/perl -MMercury::MigrateDB::ExternalRouterDNSCheck -e 'exit (Mercury::MigrateDB::ExternalRouterDNSCheck->passes_dns_check ? 0 : 1)'
/opt/airwave/bin/perl -I/root/svn/mercury/lib/perl /root/svn/mercury/scripts/cluster_role postgres_slave || /opt/airwave/bin/perl -I/root/svn/mercury/lib/perl /root/svn/mercury/scripts/cluster_role alc || /root/svn/mercury/scripts/db_down || perl -Ilib/perl -MMercury::MigrateDB::GlobalGroupTemplateCheck -e 'exit (Mercury::MigrateDB::GlobalGroupTemplateCheck->passes_check ? 0 : 1)'
/opt/airwave/bin/perl -I/root/svn/mercury/lib/perl /root/svn/mercury/scripts/cluster_role postgres_slave || /opt/airwave/bin/perl -I/root/svn/mercury/lib/perl /root/svn/mercury/scripts/cluster_role alc || /root/svn/mercury/scripts/db_down || perl -I/root/svn/mercury/lib/perl -MMercury::MigrateRRD::CheckAWRRDMigrationSpace -e 'Mercury::MigrateRRD::CheckAWRRDMigrationSpace->go'
/opt/airwave/bin/perl -I/root/svn/mercury/lib/perl /root/svn/mercury/scripts/cluster_role postgres_slave || /opt/airwave/bin/perl -I/root/svn/mercury/lib/perl /root/svn/mercury/scripts/cluster_role alc || /root/svn/mercury/scripts/db_down || perl -I/root/svn/mercury/lib/perl -MMercury::MigrateRRD::CheckAWRRDMigrationValues -e 'Mercury::MigrateRRD::CheckAWRRDMigrationValues->go'
/opt/airwave/bin/perl -I/root/svn/mercury/lib/perl /root/svn/mercury/scripts/cluster_role postgres_slave || /opt/airwave/bin/perl -I/root/svn/mercury/lib/perl /root/svn/mercury/scripts/cluster_role alc || /root/svn/mercury/scripts/db_down || perl -I/root/svn/mercury/lib/perl -MMercury::Utility::EOLDevices -e 'Mercury::Utility::EOLDevices->check_eol_devices'
No floorplans with incorrect grid size found.
/opt/airwave/bin/perl -I/root/svn/mercury/lib/perl /root/svn/mercury/scripts/cluster_role postgres_slave || /opt/airwave/bin/perl -I/root/svn/mercury/lib/perl /root/svn/mercury/scripts/cluster_role alc || /root/svn/mercury/scripts/db_down || perl -I/root/svn/mercury/lib/perl -MMercury::Scripts::DuplicateProfiles -e 'Mercury::Scripts::DuplicateProfiles->check_for_dupes'
/opt/airwave/bin/perl -I/root/svn/mercury/lib/perl /root/svn/mercury/scripts/cluster_role postgres_slave || /opt/airwave/bin/perl -I/root/svn/mercury/lib/perl /root/svn/mercury/scripts/cluster_role alc || /root/svn/mercury/scripts/db_down || perl -I/root/svn/mercury/lib/perl -MMercury::Scripts::IsUsingHelpdesk -e 'Mercury::Scripts::IsUsingHelpdesk->go'
Checking that root can sudo -u postgres:
root is not in the sudoers file. This incident will be reported.
make: *** [check_sudo_postgres] Error 1
Diagnostics:This means that the root user's entry is not present in suoders file.
We can resolve this by adding a line in the sudoers file.
SolutionPlease run the below commands:
#visudo
This will open the sudoers file, enter into edit mode by hitting "i" and then add the below line towards the bottom of the file.
## Allow root to run any commands anywhere
root ALL=(ALL) ALL
You can also add other users also who are authorized to run commands ad root in this file as well.
Once the line is added, hit "esc" followed by combination of "wq!" to save and exit.