# Installing pg\_stat\_monitor extension on FreeBSD

**URL:** <https://forums.percona.com/t/installing-pg-stat-monitor-extension-on-freebsd/29629>\
**Category:** Percona Monitoring and Management (PMM)\
**Tags:** pmm, closed-no-reply, postgresql\
**Created:** [April 8, 2024, 7:45pm UTC](https://forums.percona.com/t/installing-pg-stat-monitor-extension-on-freebsd/29629 "2024-04-08T19:45:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rups](https://avatars.discourse-cdn.com/v4/letter/r/5e9695/32.png) [@rups](https://forums.percona.com/u/rups)\
**Post date:** [April 8, 2024, 7:45pm UTC](https://forums.percona.com/t/installing-pg-stat-monitor-extension-on-freebsd/29629/1 "2024-04-08T19:45:56Z")

</div>

## Description:

Hello Team,

While trying to build from source code on FreeBSD, I am running into below compilation issues with pg\_stat\_monitor. Can you pls advise.

Followed the link here:

> **[pg\_stat\_monitor Documentation - Install](https://docs.percona.com/pg-stat-monitor/install.html#__tabbed_1_4)**
>
> Documentation

git clone git://github.com/percona/pg\_stat\_monitor.git  
Cloning into ‘pg\_stat\_monitor’…  
remote: Enumerating objects: 4682, done.  
remote: Counting objects: 100% (645/645), done.  
remote: Compressing objects: 100% (242/242), done.  
remote: Total 4682 (delta 522), reused 434 (delta 384), pack-reused 4037  
Receiving objects: 100% (4682/4682), 5.87 MiB | 4.02 MiB/s, done.  
Resolving deltas: 100% (3083/3083), done.

cd pg\_stat\_monitor  
make USE\_PGXS=1  
make USE\_PGXS=1 install

make: “/opt/pg\_stat\_monitor/Makefile” line 23: Invalid line type  
make: “/opt/pg\_stat\_monitor/Makefile” line 26: Could not find  
make: “/opt/pg\_stat\_monitor/Makefile” line 27: Invalid line type  
make: “/opt/pg\_stat\_monitor/Makefile” line 30: Could not find ../../src/Makefile.global  
make: “/opt/pg\_stat\_monitor/Makefile” line 31: Cannot open /contrib/contrib-global.mk  
make: “/opt/pg\_stat\_monitor/Makefile” line 32: Invalid line type  
make: Fatal errors encountered – cannot continue  
make: stopped in /opt/pg\_stat\_monitor  
make: “/opt/pg\_stat\_monitor/Makefile” line 23: Invalid line type  
make: “/opt/pg\_stat\_monitor/Makefile” line 26: Could not find  
make: “/opt/pg\_stat\_monitor/Makefile” line 27: Invalid line type  
make: “/opt/pg\_stat\_monitor/Makefile” line 30: Could not find ../../src/Makefile.global  
make: “/opt/pg\_stat\_monitor/Makefile” line 31: Cannot open /contrib/contrib-global.mk  
make: “/opt/pg\_stat\_monitor/Makefile” line 32: Invalid line type  
make: Fatal errors encountered – cannot continue  
make: stopped in /opt/pg\_stat\_monitor

## postgres=# select version(); version

**PostgreSQL 13.14 on amd64-portbld-freebsd13.2, compiled by clang version 15.0.7, 64-bit**  
(1 row)

which pg\_config  
/usr/local/bin/pg\_config  
LIBDIR = /usr/local/lib

Thanks!
