# Install fails due to corepack sqlite readonly 

**URL:** <https://forum.ghost.org/t/install-fails-due-to-corepack-sqlite-readonly/63230>\
**Category:** Installation\
**Created:** [June 30, 2026, 2:38pm UTC](https://forum.ghost.org/t/install-fails-due-to-corepack-sqlite-readonly/63230 "2026-06-30T14:38:03Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Leon\_Hassan](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/leon_hassan/32/40905_2.png) [@Leon\_Hassan](https://forum.ghost.org/u/Leon_Hassan)\
**Post date:** [June 30, 2026, 2:38pm UTC](https://forum.ghost.org/t/install-fails-due-to-corepack-sqlite-readonly/63230/1 "2026-06-30T14:38:03Z")

</div>

My install ([blog.leonhassan.co.uk](http://blog.leonhassan.co.uk)) was recently the victim to the injection exploit for \<v6, after attempting to recover I decided to reinstall fresh and skip all of major version migrations (with backups taken), however after attempting a clean install I am facing an issue where when I run `ghost install` it fails during the dependencies install stage with the following error:

```bash
✖ Downloading and installing Ghost v6.49.0
A ProcessError occurred.

Message: Command failed: corepack pnpm install --prod --reporter=append-only
file:///home/leon/.cache/node/corepack/v1/pnpm/11.8.0/dist/pnpm.mjs:54334
throw err2;
^

Error: attempt to write a readonly database
at file:///home/leon/.cache/node/corepack/v1/pnpm/11.8.0/dist/pnpm.mjs:54521:26
at sqliteRetry (file:///home/leon/.cache/node/corepack/v1/pnpm/11.8.0/dist/pnpm.mjs:54328:14)
at StoreIndex.setRawMany (file:///home/leon/.cache/node/corepack/v1/pnpm/11.8.0/dist/pnpm.mjs:54520:11)
at StoreIndex.flush (file:///home/leon/.cache/node/corepack/v1/pnpm/11.8.0/dist/pnpm.mjs:54509:14)
at file:///home/leon/.cache/node/corepack/v1/pnpm/11.8.0/dist/pnpm.mjs:54499:39
at process.processTicksAndRejections (node:internal/process/task_queues:84:11) {
code: 'ERR_SQLITE_ERROR',
errcode: 8,
errstr: 'attempt to write a readonly database'
}

Node.js v22.22.2

```

My old install used sqlite3, but I have removed it and installed mysql instead as recommended for self-hosting. I haven’t found anything that should point corepack to sqlite that I have done so I’m quite confused on what the next steps should be to move past the issue.

I am hosting on Ubuntu v22.04 and I have tried installing sqlite3, which made no difference when rerunning the ghost install.

Appreciate the help in getting my blog back on it’s feet, thanks in advance.

---

<div class="post-metadata">

**Author:** ![acburdine](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/acburdine/32/4825_2.png) [@acburdine](https://forum.ghost.org/u/acburdine)\
**Post date:** [June 30, 2026, 3:58pm UTC](https://forum.ghost.org/t/install-fails-due-to-corepack-sqlite-readonly/63230/2 "2026-06-30T15:58:31Z")

</div>

Hmm, this appears to be an issue we hadn’t really considered with having Ghost-CLI default to `corepack` for pnpm use 🤔

What happens if you try the following to install pnpm globally?

```sh
curl -fsSL https://get.pnpm.io/install.sh | sh -

```

(taken from the [pnpm.io docs](https://pnpm.io/installation#on-posix-systems)).

That should hopefully get pnpm installed globally, and `ghost-cli` will use that rather than try to use pnpm from corepack.

---

<div class="post-metadata">

**Author:** ![Leon\_Hassan](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/leon_hassan/32/40905_2.png) [@Leon\_Hassan](https://forum.ghost.org/u/Leon_Hassan)\
**Post date:** [July 1, 2026, 7:56am UTC](https://forum.ghost.org/t/install-fails-due-to-corepack-sqlite-readonly/63230/3 "2026-07-01T07:56:52Z")

</div>

> [@Leon\_Hassan](#):
>
> ```auto
> ile:///home/leon/.cache/node/corepack/v1/pnpm/11.8.0/dist/pnpm.mjs:54334
> throw err2;
> 
> ```

Hi Austin, thanks for the info. I’ve installed pnpm (and libatomic1 dependency), reran ghost install and get a _very_ similar error, but now from pnpm:

```bash
✖ Downloading and installing Ghost v6.49.0
A ProcessError occurred.

Message: Command failed: pnpm install --prod --reporter=append-only
file:///home/leon/.local/share/pnpm/store/v11/links/@pnpm/exe/11.9.0/ba7d0e4593f839f8a3f4faa2799a55b36b1d97f7709b79c6ede2aec641e668fe/node_modules/@pnpm/exe/dist/pnpm.mjs:54545
      throw err2;
      ^

Error: attempt to write a readonly database
    at file:///home/leon/.local/share/pnpm/store/v11/links/@pnpm/exe/11.9.0/ba7d0e4593f839f8a3f4faa2799a55b36b1d97f7709b79c6ede2aec641e668fe/node_modules/@pnpm/exe/dist/pnpm.mjs:54732:26
    at sqliteRetry (file:///home/leon/.local/share/pnpm/store/v11/links/@pnpm/exe/11.9.0/ba7d0e4593f839f8a3f4faa2799a55b36b1d97f7709b79c6ede2aec641e668fe/node_modules/@pnpm/exe/dist/pnpm.mjs:54539:14)
    at StoreIndex.setRawMany (file:///home/leon/.local/share/pnpm/store/v11/links/@pnpm/exe/11.9.0/ba7d0e4593f839f8a3f4faa2799a55b36b1d97f7709b79c6ede2aec641e668fe/node_modules/@pnpm/exe/dist/pnpm.mjs:54731:11)
    at StoreIndex.flush (file:///home/leon/.local/share/pnpm/store/v11/links/@pnpm/exe/11.9.0/ba7d0e4593f839f8a3f4faa2799a55b36b1d97f7709b79c6ede2aec641e668fe/node_modules/@pnpm/exe/dist/pnpm.mjs:54720:14)
    at file:///home/leon/.local/share/pnpm/store/v11/links/@pnpm/exe/11.9.0/ba7d0e4593f839f8a3f4faa2799a55b36b1d97f7709b79c6ede2aec641e668fe/node_modules/@pnpm/exe/dist/pnpm.mjs:54710:39
    at process.processTicksAndRejections (node:internal/process/task_queues:85:11) {
  code: 'ERR_SQLITE_ERROR',
  errcode: 8,
  errstr: 'attempt to write a readonly database'
}

Node.js v26.0.0

Exit code: 1

Debug Information:
    OS: Ubuntu, v24.04.4 LTS
    Node Version: v22.22.2
    Ghost-CLI Version: 1.29.3
    Environment: production
    Command: 'ghost install'

```

I’ve still got no idea why it’s trying to use sqlite over mysql, unless this is something internal to pnpm?

---

<div class="post-metadata">

**Author:** ![acburdine](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/acburdine/32/4825_2.png) [@acburdine](https://forum.ghost.org/u/acburdine)\
**Post date:** [July 1, 2026, 1:02pm UTC](https://forum.ghost.org/t/install-fails-due-to-corepack-sqlite-readonly/63230/4 "2026-07-01T13:02:30Z")

</div>

Yeah this appears to be an issue internal to pnpm, I’ll look and see if there’s a way we can fix this in Ghost-CLI.

---

<div class="post-metadata">

**Author:** ![Leon\_Hassan](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/leon_hassan/32/40905_2.png) [@Leon\_Hassan](https://forum.ghost.org/u/Leon_Hassan)\
**Post date:** [July 9, 2026, 8:20am UTC](https://forum.ghost.org/t/install-fails-due-to-corepack-sqlite-readonly/63230/5 "2026-07-09T08:20:33Z")

</div>

Hi Austin, any update or ETA? 🤞

---

<div class="post-metadata">

**Author:** ![acburdine](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/acburdine/32/4825_2.png) [@acburdine](https://forum.ghost.org/u/acburdine)\
**Post date:** [July 9, 2026, 10:39am UTC](https://forum.ghost.org/t/install-fails-due-to-corepack-sqlite-readonly/63230/6 "2026-07-09T10:39:47Z")

</div>

Apologies, totally meant to look at this and got sidetracked 😕 will make sure to look today or tomorrow

---

<div class="post-metadata">

**Author:** ![Leon\_Hassan](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/leon_hassan/32/40905_2.png) [@Leon\_Hassan](https://forum.ghost.org/u/Leon_Hassan)\
**Post date:** [July 9, 2026, 10:51am UTC](https://forum.ghost.org/t/install-fails-due-to-corepack-sqlite-readonly/63230/7 "2026-07-09T10:51:32Z")

</div>

No sweat, appreciate you looking into it! Thanks 😁

---

<div class="post-metadata">

**Author:** ![acburdine](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/acburdine/32/4825_2.png) [@acburdine](https://forum.ghost.org/u/acburdine)\
**Post date:** [July 9, 2026, 1:22pm UTC](https://forum.ghost.org/t/install-fails-due-to-corepack-sqlite-readonly/63230/8 "2026-07-09T13:22:47Z")

</div>

Ok, I just published a new Ghost-CLI version `1.30.0` - can you try installing/using that version to see if it fixes the issue?

---

<div class="post-metadata">

**Author:** ![Leon\_Hassan](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/leon_hassan/32/40905_2.png) [@Leon\_Hassan](https://forum.ghost.org/u/Leon_Hassan)\
**Post date:** [July 10, 2026, 7:45am UTC](https://forum.ghost.org/t/install-fails-due-to-corepack-sqlite-readonly/63230/9 "2026-07-10T07:45:44Z")

</div>

The updated version is working, thank you very much Austin! Have a great weekend 😁
