Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error installing on macOS 14.0 - Operation not permitted make: *** [install] Error 71 #596

Closed
erielias opened this issue Dec 7, 2023 · 6 comments
Assignees

Comments

@erielias
Copy link

erielias commented Dec 7, 2023

Hi everyone!

Trying to install the 4.7.3 version on my macOS Sonoma 14.0 (23A344) and getting the following error.
Here is the step-by-setp:

Xcode 15.0.1 installed
Xcode-select version 2399 installed

PG_PARTMAN_VERSION="4.7.3" wget "https://github.com/pgpartman/pg_partman/archive/refs/tags/v${PG_PARTMAN_VERSION}.zip" -O "pg_partman-${PG_PARTMAN_VERSION}.zip" unzip "pg_partman-${PG_PARTMAN_VERSION}.zip" cd "pg_partman-${PG_PARTMAN_VERSION}" make NO_BGW=1 install

I get the error:

cat sql/types/types.sql sql/tables/tables.sql sql/functions/apply_cluster.sql sql/functions/apply_constraints.sql sql/functions/apply_foreign_keys.sql sql/functions/apply_privileges.sql sql/functions/apply_publications.sql sql/functions/autovacuum_off.sql sql/functions/autovacuum_reset.sql sql/functions/check_control_type.sql sql/functions/check_default.sql sql/functions/check_name_length.sql sql/functions/check_subpart_sameconfig.sql sql/functions/check_subpartition_limits.sql sql/functions/create_function_id.sql sql/functions/create_function_time.sql sql/functions/create_parent.sql sql/functions/create_partition_id.sql sql/functions/create_partition_time.sql sql/functions/create_sub_parent.sql sql/functions/create_trigger.sql sql/functions/drop_constraints.sql sql/functions/drop_partition_column.sql sql/functions/drop_partition_id.sql sql/functions/drop_partition_time.sql sql/functions/dump_partition_table_definition.sql sql/functions/inherit_template_properties.sql sql/functions/partition_data_id.sql sql/functions/partition_data_time.sql sql/functions/partition_gap_fill.sql sql/functions/reapply_privileges.sql sql/functions/run_maintenance.sql sql/functions/show_partition_info.sql sql/functions/show_partition_name.sql sql/functions/show_partitions.sql sql/functions/stop_sub_partition.sql sql/functions/undo_partition.sql sql/procedures/partition_data_proc.sql sql/procedures/reapply_constraints_proc.sql sql/procedures/run_analyze.sql sql/procedures/run_maintenance_proc.sql sql/procedures/undo_partition_proc.sql > sql/pg_partman--4.7.3.sql /bin/sh /Applications/Postgres.app/Contents/Versions/14/lib/postgresql/pgxs/src/makefiles/../../config/install-sh -c -d '/Applications/Postgres.app/Contents/Versions/14/share/postgresql/extension' /bin/sh /Applications/Postgres.app/Contents/Versions/14/lib/postgresql/pgxs/src/makefiles/../../config/install-sh -c -d '/Applications/Postgres.app/Contents/Versions/14/share/postgresql/extension' /bin/sh /Applications/Postgres.app/Contents/Versions/14/lib/postgresql/pgxs/src/makefiles/../../config/install-sh -c -d '/Applications/Postgres.app/Contents/Versions/14/share/doc/postgresql/extension' /bin/sh /Applications/Postgres.app/Contents/Versions/14/lib/postgresql/pgxs/src/makefiles/../../config/install-sh -c -d '/Applications/Postgres.app/Contents/Versions/14/bin' /usr/bin/install -c -m 644 .//pg_partman.control '/Applications/Postgres.app/Contents/Versions/14/share/postgresql/extension/' install: /Applications/Postgres.app/Contents/Versions/14/share/postgresql/extension//pg_partman.control: Operation not permitted make: *** [install] Error 71

also tried with sudo:

wget "https://github.com/pgpartman/pg_partman/archive/refs/tags/v${PG_PARTMAN_VERSION}.zip" -O "pg_partman-${PG_PARTMAN_VERSION}.zip" unzip "pg_partman-${PG_PARTMAN_VERSION}.zip" cd "pg_partman-${PG_PARTMAN_VERSION}" sudo make NO_BGW=1 install

@erielias erielias changed the title Error installing on macOS 14.0 Error installing on macOS 14.0 - Operation not permitted make: *** [install] Error 71 Dec 7, 2023
@keithf4
Copy link
Collaborator

keithf4 commented Jan 5, 2024

First error does look like a permission error. I don't have Mac myself, but I know that when you run a sudo make on Linux you have to make sure the paths to all relevant binaries/libraries are also available while privileges are elevated. For example, on RHEL, the pg_config binary is not in the default path so when running sudo make there, I have to make sure I adjust the PATH setting.

There are some other closed issues here on this git repo with people doing compilation on Mac. Perhaps one of those might provide some insight.

@keithf4 keithf4 self-assigned this Jan 5, 2024
@palashvijay
Copy link

@keithf4 I am facing the same issue on MacOS Sonoma 14.1 (23B74). So far not been able to figure out the workaround/fix for this.

@brettgoulder
Copy link

Hi @erielias and @palashvijay, this seems to be an issue with System Integrity Protection, possibly due to the Postgres.app installation.

My suggestion would be to disable System Integrity Protection via Recovery Mode, restart back into the normal OS, then try installing pg_partman. Once you've done that, be sure to follow the same steps to enable SIP again.

Here are instructions on how to do this: https://developer.apple.com/documentation/security/disabling_and_enabling_system_integrity_protection

@erielias
Copy link
Author

Thanks a lot @keithf4 and @brettgoulder.
In my case, it was very simple fix.
Make sure your terminal has full disk access before installing:
Go to System Settings -> Privacy & Security -> Full Disk Access and add your terminal application to the list or enable it.

I hope this will help more people paying attention on that one. In my case my terminal app used to have that access but for some reason, maybe MacOS updates, it was revoke and I did not noticed.

Thanks again!

@brettgoulder
Copy link

brettgoulder commented Jan 12, 2024

@erielias even easier than disabling SIP ;) Thanks for letting us know.

@keithf4
Copy link
Collaborator

keithf4 commented Jan 14, 2024

@brettgoulder Thank you for the assistance!

@keithf4 keithf4 closed this as completed Jan 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants