My Oracle Support Banner

Solaris 11 and Later - pkg command fails with: OSError: [Errno 20] or OSError: [Errno 2] (Doc ID 2076001.1)

Last updated on JULY 24, 2023

Applies to:

Solaris Operating System - Version 11.0 and later
Oracle Solaris on SPARC (64-bit)
Oracle Solaris on x86-64 (64-bit)

Symptoms

pkg update or pkg uninstall fails with error OSError:

The shown errno and target name can vary.

From errno.h:
#define    ENOENT    2    /* No such file or directory        */
#define    ENOTDIR    20    /* Not a directory            */

Example error messages below:

 

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.