[GH-ISSUE #1099] Running the Electron App on Linux Results in "osascript not found" Error #78224

Closed
opened 2026-05-08 22:19:30 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @horw on GitHub (Nov 12, 2023).
Original GitHub issue: https://github.com/ollama/ollama/issues/1099

Issue Description:

I attempted to run the application on a Linux system, and I encountered an error related to the osascript command, which is specific to macOS. Since osascript is a macOS-specific tool for executing AppleScript or JavaScript scripts, it is not available on Linux.

Error Message:

could not install:  Error: Command failed: osascript -e 'do shell script "mkdir -p /usr/local/bin && ln -F -s \"/home/horw/playground/ollama/ollama\" \"/usr/local/bin/ollama\"" with administrator privileges'
/bin/sh: 1: osascript: not found

Error occurred code Snippet:


export async function install() {
  const command = `do shell script "mkdir -p ${path.dirname(
    symlinkPath
  )} && ln -F -s \\"${ollama}\\" \\"${symlinkPath}\\"" with administrator privileges`

  await exec(`osascript -e '${command}'`)
}

Expected Behavior:

I believe it would be beneficial to provide a more informative error message or notice to users in README.md when attempting to run the application on Linux.

Steps to Reproduce:

  1. Attempt to run the application on a Linux system.
  2. Observe the "osascript not found" error.

Environment:

  • Operating System: Ubuntu 22.04.2 LTS
Originally created by @horw on GitHub (Nov 12, 2023). Original GitHub issue: https://github.com/ollama/ollama/issues/1099 **Issue Description:** I attempted to run the application on a Linux system, and I encountered an error related to the `osascript` command, which is specific to macOS. Since `osascript` is a macOS-specific tool for executing AppleScript or JavaScript scripts, it is not available on Linux. **Error Message:** ``` could not install: Error: Command failed: osascript -e 'do shell script "mkdir -p /usr/local/bin && ln -F -s \"/home/horw/playground/ollama/ollama\" \"/usr/local/bin/ollama\"" with administrator privileges' /bin/sh: 1: osascript: not found ``` **Error occurred code Snippet:** ```js export async function install() { const command = `do shell script "mkdir -p ${path.dirname( symlinkPath )} && ln -F -s \\"${ollama}\\" \\"${symlinkPath}\\"" with administrator privileges` await exec(`osascript -e '${command}'`) } ``` **Expected Behavior:** I believe it would be beneficial to provide a more informative error message or notice to users in **README.md** when attempting to run the application on Linux. **Steps to Reproduce:** 1. Attempt to run the application on a Linux system. 2. Observe the "osascript not found" error. **Environment:** - Operating System: Ubuntu 22.04.2 LTS
Author
Owner

@BruceMacD commented on GitHub (Nov 13, 2023):

Hey horw, thanks for opening the issue. You are correct that the electron app is Mac only, it's just a way to keep the server running and Ollama up to date.

<!-- gh-comment-id:1809168602 --> @BruceMacD commented on GitHub (Nov 13, 2023): Hey horw, thanks for opening the issue. You are correct that the electron app is Mac only, it's just a way to keep the server running and Ollama up to date.
Author
Owner

@jmorganca commented on GitHub (Feb 20, 2024):

Hi there, I will close this for now as our plan is to replace the macOS electron app with a native one

<!-- gh-comment-id:1953333065 --> @jmorganca commented on GitHub (Feb 20, 2024): Hi there, I will close this for now as our plan is to replace the macOS electron app with a native one
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#78224