[GH-ISSUE #222] mkcert as local user getting Not: not found #142

Closed
opened 2026-02-25 22:32:42 +03:00 by kerem · 3 comments
Owner

Originally created by @wizonesolutions on GitHub (Nov 20, 2019).
Original GitHub issue: https://github.com/FiloSottile/mkcert/issues/222

I'm running mkcert as a local Docker container user in order to get it installed into the NSS DB so that it will work with headless Chrome (and Selenium) in a Docker container. I've used this approach successfully in a different container, but in this one (selenium/standalone-chrome-debug) I'm hitting a strange error that I'm not quite sure how to diagnose or debug.

Command: output

$ TRUST_STORES=nss mkcert -install
/usr/local/bin/mkcert: 1: /usr/local/bin/mkcert: Not: not found

From what I can tell, the tool is getting unexpected output and trying to execute that output. When I tried another invocation of this (with sudo -E in case permissions were an issue), it failed on line 26 of sh.

It's running Ubuntu:

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.2 LTS
Release:        18.04
Codename:       bionic

I install mkcert in the Dockerfile with:

ENV MKCERT_VERSION=v1.4.0
RUN sudo su -c 'apt-get update && \
  apt-get install -y curl openssl libnss3-tools && \
  curl -sSL https://github.com/FiloSottile/mkcert/releases/download/$MKCERT_VERSION/mkcert-$MKCERT_VERSION-linux-amd64 -o /usr/local/bin/mkcert && \
  chmod +x /usr/local/bin/mkcert && \
  apt-get purge -y curl && apt-get clean && \
  chmod +x /selenium2-startup.sh'

And I see paths to the expected binaries with which, etc.

Originally created by @wizonesolutions on GitHub (Nov 20, 2019). Original GitHub issue: https://github.com/FiloSottile/mkcert/issues/222 I'm running mkcert as a local Docker container user in order to get it installed into the NSS DB so that it will work with headless Chrome (and Selenium) in a Docker container. I've used this approach successfully in a different container, but in this one (selenium/standalone-chrome-debug) I'm hitting a strange error that I'm not quite sure how to diagnose or debug. Command: output ``` $ TRUST_STORES=nss mkcert -install /usr/local/bin/mkcert: 1: /usr/local/bin/mkcert: Not: not found ``` From what I can tell, the tool is getting unexpected output and trying to execute that output. When I tried another invocation of this (with `sudo -E` in case permissions were an issue), it failed on line 26 of `sh`. It's running Ubuntu: ``` No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 18.04.2 LTS Release: 18.04 Codename: bionic ``` I install mkcert in the Dockerfile with: ``` ENV MKCERT_VERSION=v1.4.0 RUN sudo su -c 'apt-get update && \ apt-get install -y curl openssl libnss3-tools && \ curl -sSL https://github.com/FiloSottile/mkcert/releases/download/$MKCERT_VERSION/mkcert-$MKCERT_VERSION-linux-amd64 -o /usr/local/bin/mkcert && \ chmod +x /usr/local/bin/mkcert && \ apt-get purge -y curl && apt-get clean && \ chmod +x /selenium2-startup.sh' ``` And I see paths to the expected binaries with `which`, etc.
kerem closed this issue 2026-02-25 22:32:42 +03:00
Author
Owner

@wizonesolutions commented on GitHub (Nov 20, 2019):

Ah. The contents of /usr/local/bin/mkcert are Not Found, so I guess the URL changed from last time I used it. That'll do it! Closing this.

<!-- gh-comment-id:555981342 --> @wizonesolutions commented on GitHub (Nov 20, 2019): Ah. The contents of `/usr/local/bin/mkcert` are `Not Found`, so I guess the URL changed from last time I used it. That'll do it! Closing this.
Author
Owner

@wizonesolutions commented on GitHub (Nov 20, 2019):

P.S. link was fine, my switch to single quotes when porting my Dockerfile from headless Chrome to Selenium was the culprit. Obviously a literal $MKCERT_VERSION won't work.

<!-- gh-comment-id:555982123 --> @wizonesolutions commented on GitHub (Nov 20, 2019): P.S. link was fine, my switch to single quotes when porting my Dockerfile from headless Chrome to Selenium was the culprit. Obviously a literal `$MKCERT_VERSION` won't work.
Author
Owner

@aureate-labs-team commented on GitHub (Mar 26, 2021):

I'm running mkcert as a local Docker container user in order to get it installed into the NSS DB so that it will work with headless Chrome (and Selenium) in a Docker container. I've used this approach successfully in a different container, but in this one (selenium/standalone-chrome-debug) I'm hitting a strange error that I'm not quite sure how to diagnose or debug.

Command: output

$ TRUST_STORES=nss mkcert -install
/usr/local/bin/mkcert: 1: /usr/local/bin/mkcert: Not: not found

From what I can tell, the tool is getting unexpected output and trying to execute that output. When I tried another invocation of this (with sudo -E in case permissions were an issue), it failed on line 26 of sh.

It's running Ubuntu:

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.2 LTS
Release:        18.04
Codename:       bionic

I install mkcert in the Dockerfile with:

ENV MKCERT_VERSION=v1.4.0
RUN sudo su -c 'apt-get update && \
  apt-get install -y curl openssl libnss3-tools && \
  curl -sSL https://github.com/FiloSottile/mkcert/releases/download/$MKCERT_VERSION/mkcert-$MKCERT_VERSION-linux-amd64 -o /usr/local/bin/mkcert && \
  chmod +x /usr/local/bin/mkcert && \
  apt-get purge -y curl && apt-get clean && \
  chmod +x /selenium2-startup.sh'

And I see paths to the expected binaries with which, etc.

You should try "./mkcert -install"

<!-- gh-comment-id:807963567 --> @aureate-labs-team commented on GitHub (Mar 26, 2021): > I'm running mkcert as a local Docker container user in order to get it installed into the NSS DB so that it will work with headless Chrome (and Selenium) in a Docker container. I've used this approach successfully in a different container, but in this one (selenium/standalone-chrome-debug) I'm hitting a strange error that I'm not quite sure how to diagnose or debug. > > Command: output > > ``` > $ TRUST_STORES=nss mkcert -install > /usr/local/bin/mkcert: 1: /usr/local/bin/mkcert: Not: not found > ``` > > From what I can tell, the tool is getting unexpected output and trying to execute that output. When I tried another invocation of this (with `sudo -E` in case permissions were an issue), it failed on line 26 of `sh`. > > It's running Ubuntu: > > ``` > No LSB modules are available. > Distributor ID: Ubuntu > Description: Ubuntu 18.04.2 LTS > Release: 18.04 > Codename: bionic > ``` > > I install mkcert in the Dockerfile with: > > ``` > ENV MKCERT_VERSION=v1.4.0 > RUN sudo su -c 'apt-get update && \ > apt-get install -y curl openssl libnss3-tools && \ > curl -sSL https://github.com/FiloSottile/mkcert/releases/download/$MKCERT_VERSION/mkcert-$MKCERT_VERSION-linux-amd64 -o /usr/local/bin/mkcert && \ > chmod +x /usr/local/bin/mkcert && \ > apt-get purge -y curl && apt-get clean && \ > chmod +x /selenium2-startup.sh' > ``` > > And I see paths to the expected binaries with `which`, etc. You should try "**./mkcert -install**"
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/mkcert#142
No description provided.