question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot start powershell because of missing file on mac

See original GitHub issue

Prerequisites

  • Write a descriptive title.
  • Make sure you are able to repro it on the latest released version
  • Search the existing issues, especially the pinned issues.

Exception report

Oops, something went wrong.
Please report this bug with ALL the details below, including both the 'Environment' and 'Exception' sections.
Please report on GitHub: https://github.com/PowerShell/PSReadLine/issues/new?template=Bug_Report.yaml
Thank you!

### Environment
PSReadLine: 2.2.6
PowerShell: 7.3.6
OS: Darwin 22.6.0 Darwin Kernel Version 22.6.0: Wed Jul  5 22:21:56 PDT 2023; root:xnu-8796.141.3~6/RELEASE_X86_64
BufferWidth: 80
BufferHeight: 24

Last 0 Keys:



### Exception

System.IO.IOException: The system cannot open the device or file specified. : 'PSReadLineHistoryFile_2044101305'
   at System.Threading.Mutex.CreateMutexCore(Boolean initiallyOwned, String name, Boolean& createdNew)
   at System.Threading.Mutex..ctor(Boolean initiallyOwned, String name)
   at Microsoft.PowerShell.PSConsoleReadLine.DelayedOneTimeInitialize()
   at Microsoft.PowerShell.PSConsoleReadLine.Initialize(Runspace runspace, EngineIntrinsics engineIntrinsics)
   at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics, CancellationToken cancellationToken, Nullable`1 lastRunStatus)

Screenshot

Oops, something went wrong. Please report this bug with ALL the details below, including both the ‘Environment’ and ‘Exception’ sections. Please report on GitHub: https://github.com/PowerShell/PSReadLine/issues/new?template=Bug_Report.yaml Thank you!

Environment

PSReadLine: 2.2.6 PowerShell: 7.3.6 OS: Darwin 22.6.0 Darwin Kernel Version 22.6.0: Wed Jul 5 22:21:56 PDT 2023; root:xnu-8796.141.3~6/RELEASE_X86_64 BufferWidth: 80 BufferHeight: 24

Last 0 Keys:

Exception

System.IO.IOException: The system cannot open the device or file specified. : ‘PSReadLineHistoryFile_2044101305’ at System.Threading.Mutex.CreateMutexCore(Boolean initiallyOwned, String name, Boolean& createdNew) at System.Threading.Mutex…ctor(Boolean initiallyOwned, String name) at Microsoft.PowerShell.PSConsoleReadLine.DelayedOneTimeInitialize() at Microsoft.PowerShell.PSConsoleReadLine.Initialize(Runspace runspace, EngineIntrinsics engineIntrinsics) at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics, CancellationToken cancellationToken, Nullable`1 lastRunStatus)

Environment data

PS Version 7.3.6

Steps to reproduce

Open powershell

Expected behavior

Powershell opens correctly.

Actual behavior

powershell fails with the above message.

Issue Analytics

  • State:closed
  • Created 2 months ago
  • Comments:10

github_iconTop GitHub Comments

1reaction
jimmymaincommented, Aug 8, 2023

Ok did the permissions changes on /private/tmp, and now it’s working, many thanks after so many searches.

Anyway, chmod 777 /private/tmp and chmod +t /private/tmp to fix the permissions and PS now works fine
0reactions
jimmymaincommented, Aug 8, 2023

I really thought you had it there. But alas no.

Filesystem   1024-blocks      Used Available Capacity iused      ifree %iused  Mounted on
/dev/disk1s2   488245288 165777580 307951552    35% 1017461 3079515520    0%   /System/Volumes/Data

I deleted the powerlog folder in /tmp and that did not help either.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Installing PowerShell on macOS
Information about installing PowerShell on macOS.
Read more >
Powershell help module not able to find help files in MacOS
I am running PowerShell Core 7.2.6 installed via homebrew on MacBook Air M1 (12.6). However, when I try to use the help module...
Read more >
How to Fix “Command Not Found” Errors in Mac ...
“Command not found” because a system directory is missing? Restore the missing system files. Every once in a while, Mac users may find ......
Read more >
Apple can't check app for malicious software
Apple can't check app for malicious software · In the Finder on your Mac, locate the app you want to open. Don't use...
Read more >
How to Fix the System Cannot Find the File Specified
Press "Ctrl + F" hotkey and type cannot find the file in the search. Step 4. Press "Enter" to run the search. You...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found