mkdir/home:read-only file system error during go install

Asked 2 years ago, Updated 2 years ago, 389 views

go install github.com/99designs/[email protected]

Running the above command

go install github.com/99designs/gqlgen:mkdir/home:read-only file system

The error occurs.
When I looked into the error, I found out that it was an error due to the Mac OS configuration.

However, go install has been successful in other projects, so I believe it is not due to the OS.
If anyone remembers the same error, please reply.

macos go

2022-09-30 22:04

2 Answers

mkdir/home:read-only file system

MacOS file systems cannot create directories directly below the root "/".
You can't even create root privileges.

$sudomkdir/hogehoge
Password: *********
mkdir: /hogehoge: Read-only file system

Specify another directory with permissions.


2022-09-30 22:04

It seems that the error was caused by the wrong path of 'GOBIN' among Go's environment variables.


2022-09-30 22:04

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.