Homebrew-cask: Bug report: "Operation not permitted" when installing parallels-access

Created on 18 Nov 2016  路  25Comments  路  Source: Homebrew/homebrew-cask

Description of issue

I'm trying to install Parallels Access. This failes with Operation not permitted but more on that below. I have looked into the PRs that added the cask and there was some discussion going on but since I'm new in the Mac and homebrew world I couldn't really find out more about my issue.

Output of brew cask install parallels-access --verbose

__I skipped the downloading output.__

==> Verifying checksum for Cask parallels-access
==> ditto: /usr/local/Caskroom/parallels-access/3.0.2-30719/Parallels Access.app/Contents/PkgInfo: Operation not permitted
Error: Command failed to execute!

==> Failed command:
/usr/bin/ditto --bom /var/folders/dy/s6dd70892l35f0444cwt96t40000gn/T/20161118-34303-8e1s7c.bom -- /private/tmp/dmg.g91GOH #<Pathname:/usr/local/Caskroom/parallels-access/3.0.2-30719>

==> Standard Output of failed command:


==> Standard Error of failed command:
ditto: /usr/local/Caskroom/parallels-access/3.0.2-30719/Parallels Access.app/Contents/PkgInfo: Operation not permitted


==> Exit status of failed command:
#<Process::Status: pid 34468 exit 1>
Error: Kernel.exit

Output of brew doctor

Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry and just ignore them. Thanks!

Warning: "config" scripts exist outside your system or Homebrew directories.
`./configure` scripts often look for *-config scripts to determine if
software packages are installed, and what additional flags to use when
compiling and linking.

Having additional scripts in your path can confuse software installed via
Homebrew if the config script overrides a system or Homebrew provided
script of the same name. We found the following "config" scripts:
  /Applications/Postgres.app/Contents/Versions/latest/bin/gdal-config

Warning: Broken symlinks were found. Remove them with `brew prune`:
  /usr/local/share/man/man8/prlexec.8

Output of brew cask doctor

==> macOS Release:
10.12.1
==> Hardware Architecture:
intel-64
==> Ruby Version:
2.0.0-p648
==> Ruby Path:
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
==> Homebrew Version:
Homebrew 1.1.1
Homebrew/homebrew-core (git revision 0b98; last commit 2016-11-17)
==> Homebrew Executable Path:
/usr/local/bin/brew
==> Homebrew Cellar Path:
/usr/local/Cellar
==> Homebrew Repository Path:
/usr/local/Homebrew
==> Homebrew Origin:
https://github.com/Homebrew/brew
==> Homebrew-Cask Version:
Homebrew-Cask 1.1.1
caskroom/homebrew-cask (git revision 76e15; last commit 2016-11-17)
==> Homebrew-Cask Install Location:
<NONE>
==> Homebrew-Cask Staging Location:
/usr/local/Caskroom
==> Homebrew-Cask Cached Downloads:
/Users/lukasmalkmus/Library/Caches/Homebrew/Cask
0 files, 0B
==> Homebrew-Cask Default Tap Path:
/usr/local/Homebrew/Library/Taps/caskroom/homebrew-cask
==> Homebrew-Cask Alternate Cask Taps:
/usr/local/Homebrew/Library/Taps/caskroom/homebrew-fonts
==> Homebrew-Cask Default Tap Cask Count:
3427
==> Contents of $LOAD_PATH:
/usr/local/Homebrew/Library/Homebrew/cask/lib
/usr/local/Homebrew/Library/Homebrew
/Library/Ruby/Site/2.0.0
/Library/Ruby/Site/2.0.0/x86_64-darwin16
/Library/Ruby/Site/2.0.0/universal-darwin16
/Library/Ruby/Site
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/vendor_ruby/2.0.0
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/vendor_ruby/2.0.0/x86_64-darwin16
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/vendor_ruby/2.0.0/universal-darwin16
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/vendor_ruby
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/x86_64-darwin16
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin16
==> Contents of $RUBYLIB Environment Variable:
<NONE>
==> Contents of $RUBYOPT Environment Variable:
<NONE>
==> Contents of $RUBYPATH Environment Variable:
<NONE>
==> Contents of $RBENV_VERSION Environment Variable:
<NONE>
==> Contents of $CHRUBY_VERSION Environment Variable:
<NONE>
==> Contents of $GEM_HOME Environment Variable:
<NONE>
==> Contents of $GEM_PATH Environment Variable:
<NONE>
==> Contents of $BUNDLE_PATH Environment Variable:
<NONE>
==> Contents of $PATH Environment Variable:
PATH="/Library/Frameworks/Mono.framework/Versions/Current/Commands:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/lukasmalkmus/Code/Go/bin:/usr/local/opt/go/libexec/bin:/Applications/Postgres.app/Contents/Versions/latest/bin:/usr/local/Homebrew/Library/Homebrew/cask/cmd:/usr/local/Homebrew/Library/Homebrew/shims/scm"
==> Contents of $SHELL Environment Variable:
SHELL="/usr/local/bin/fish"
==> Contents of Locale Environment Variables:
LANG="de.UTF-8"
LC_ALL="en_US.UTF-8"
LC_CTYPE="UTF-8"

All 25 comments

Run sudo chown -R "$(whoami)" -- /usr/local/Caskroom and try again.

No this didn't solve the issue.
But I'm using fish shell so I had to change the command a little bit. Just to clarify: The command you posted above should make my local user the owner of the Caskroom folder, right?

And sorry for not settings the issue title 馃槩 Just forgot that.

Could you run brew cask install parallels-access --verbose --debug and paste the output here in a <details> tag like in the OP?

Output of brew cask install parallels-access --verbose --debug

==> Loading Cask definitions
==> Translating 'parallels-access' into a valid Cask source
==> Testing source class Hbc::Source::URI
==> Testing source class Hbc::Source::PathSlashRequired
==> Testing source class Hbc::Source::TappedQualified
==> Testing source class Hbc::Source::UntappedQualified
==> Testing source class Hbc::Source::Tapped
==> Success! Using source class Hbc::Source::Tapped
==> Resolved Cask URI or file source to '/usr/local/Homebrew/Library/Taps/caskroom/homebrew-cask/Casks/parallels-access.rb'
==> Cask instance dumps in YAML:
Warning: Unexpected method 'encode_with' called on Cask parallels-access.
Follow the instructions here:
  https://github.com/caskroom/homebrew-cask/blob/master/doc/reporting_bugs/pre_bug_report.md

If this doesn鈥檛 fix the problem, please report this bug:
  https://github.com/caskroom/homebrew-cask#reporting-bugs

==> Cask instance toplevel:
--- !ruby/object:Hbc::Cask
token: parallels-access
sourcefile_path: !ruby/object:Pathname
  path: /usr/local/Homebrew/Library/Taps/caskroom/homebrew-cask/Casks/parallels-access.rb
dsl: !ruby/object:Hbc::DSL {}
==> Cask instance method 'name':
---
- Parallels Access
==> Cask instance method 'homepage':
--- https://www.parallels.com/products/access/
...
==> Cask instance method 'url':
--- !ruby/object:Hbc::URL
uri: !ruby/object:URI::HTTPS
  scheme: https
  user: 
  password: 
  host: download.parallels.com
  port: 443
  path: /pmobile/v3/3.0.2/ParallelsAccess-3.0.2-30719-mac.dmg
  query: 
  opaque: 
  registry: 
  fragment: 
  parser: 
user_agent: 
cookies: 
referer: 
using: 
revision: 
trust_cert: 
data: 
==> Cask instance method 'appcast':
--- 
...
==> Cask instance method 'version':
--- !ruby/string:Hbc::DSL::Version
str: !binary |-
  My4wLjItMzA3MTk=
raw_version: 3.0.2-30719
==> Cask instance method 'sha256':
--- afafadd6f3e384c0e421b10eb827f83fa65b60206c938431c9c20083d6a0f252
...
==> Cask instance method 'artifacts':
---
:installer: !ruby/object:Set
  hash:
    ? !ruby/object:Hbc::DSL::Installer
      script:
        :args:
        - instance_install
        :sudo: true
        :executable: Parallels Access.app/Contents/MacOS/pm_ctl
    : true
:uninstall: !ruby/object:Set
  hash:
    ? :launchctl:
      - com.parallels.mobile.startgui.launchagent
      - com.parallels.mobile.dispatcher.launchdaemon
      - com.parallels.mobile.kextloader.launchdaemon
      - com.parallels.mobile.prl_deskctl_agent.launchagent
      :quit:
      - com.parallels.inputmethod.ParallelsIM
      :signal:
      - - TERM
        - com.parallels.mobile
      - - TERM
        - com.parallels.mobile.prl_deskctl_agent
      :kext:
      - com.parallels.virtualhid
      - com.parallels.virtualsound
      :delete: /Applications/Parallels Access.app
    : true
:zap: !ruby/object:Set
  hash:
    ? :delete:
      - ~/Library/Cookies/com.parallels.mobile.prl_deskctl_agent.binarycookies
      - ~/Library/Group Containers/4C6364ACXT.com.parallels.Access
      - ~/Library/Preferences/com.parallels.Parallels Access.plist
      - ~/Library/Preferences/com.parallels.Parallels Access.plist.sdb
      - ~/Library/Preferences/com.parallels.mobile.plist
    : true
==> Cask instance method 'caveats':
--- []
==> Cask instance method 'depends_on':
--- 
...
==> Cask instance method 'conflicts_with':
--- 
...
==> Cask instance method 'container':
--- 
...
==> Cask instance method 'gpg':
--- 
...
==> Cask instance method 'accessibility_access':
--- 
...
==> Cask instance method 'auto_updates':
--- 
...
==> Hbc::Installer.install
==> Printing caveats
==> Downloading
==> Downloading https://download.parallels.com/pmobile/v3/3.0.2/ParallelsAccess-3.0.2-30719-mac.dmg
==> Calling curl with args ["https://download.parallels.com/pmobile/v3/3.0.2/ParallelsAccess-3.0.2-30719-mac.dmg", "-C", "0", "-o", "#<Pathname:/Users/lukasmalkmus/Library/Caches/Homebrew/Cask/parallels-access--3.0.2-30719.dmg.incomplete>"]
/usr/bin/curl --fail --remote-time --location --user-agent Homebrew/1.1.1 (Macintosh; Intel macOS 10.12.1) curl/7.49.1 https://download.parallels.com/pmobile/v3/3.0.2/ParallelsAccess-3.0.2-30719-mac.dmg -C 0 -o /Users/lukasmalkmus/Library/Caches/Homebrew/Cask/parallels-access--3.0.2-30719.dmg.incomplete
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 97.1M  100 97.1M    0     0  2630k      0  0:00:37  0:00:37 --:--:-- 3021k
==> Downloaded to -> /Users/lukasmalkmus/Library/Caches/Homebrew/Cask/parallels-access--3.0.2-30719.dmg
==> Verifying download
==> Determining which verifications to run for Cask parallels-access
==> Checking for verification class Hbc::Verify::Checksum
==> 1 verifications defined
Hbc::Verify::Checksum
==> Running verification of class Hbc::Verify::Checksum
==> Verifying checksum for Cask parallels-access
==> SHA256 checksums match
==> Extracting primary container
==> Determining which containers to use based on filetype
==> Checking container class Hbc::Container::Pkg
==> Checking container class Hbc::Container::Ttf
==> Checking container class Hbc::Container::Otf
==> Checking container class Hbc::Container::Air
==> Checking container class Hbc::Container::Cab
==> Checking container class Hbc::Container::Dmg
==> Executing: ["/usr/bin/hdiutil", "imageinfo", "/Users/lukasmalkmus/Library/Caches/Homebrew/Cask/parallels-access--3.0.2-30719.dmg"]
==> Using container class Hbc::Container::Dmg for /Users/lukasmalkmus/Library/Caches/Homebrew/Cask/parallels-access--3.0.2-30719.dmg
==> Executing: ["/usr/bin/hdiutil", "mount", "-plist", "-nobrowse", "-readonly", "-noidme", "-mountrandom", "/tmp", "/Users/lukasmalkmus/Library/Caches/Homebrew/Cask/parallels-access--3.0.2-30719.dmg"]
==> Executing: ["/usr/bin/mkbom", "-s", "-i", "/var/folders/dy/s6dd70892l35f0444cwt96t40000gn/T/20161119-77500-1ke6mkj.list", "--", "/var/folders/dy/s6dd70892l35f0444cwt96t40000gn/T/20161119-77500-k156h2.bom"]
==> Executing: ["/usr/bin/ditto", "--bom", "/var/folders/dy/s6dd70892l35f0444cwt96t40000gn/T/20161119-77500-k156h2.bom", "--", "/private/tmp/dmg.9z8wfw", "/usr/local/Caskroom/parallels-access/3.0.2-30719"]
==> ditto: /usr/local/Caskroom/parallels-access/3.0.2-30719/Parallels Access.app/Contents/PkgInfo: Operation not permitted
==> Executing: ["/usr/sbin/diskutil", "eject", "/private/tmp/dmg.9z8wfw"]
==> Purging files for version 3.0.2-30719 of Cask parallels-access
Error: Command failed to execute!

==> Failed command:
/usr/bin/ditto --bom /var/folders/dy/s6dd70892l35f0444cwt96t40000gn/T/20161119-77500-k156h2.bom -- /private/tmp/dmg.9z8wfw #<Pathname:/usr/local/Caskroom/parallels-access/3.0.2-30719>

==> Standard Output of failed command:


==> Standard Error of failed command:
ditto: /usr/local/Caskroom/parallels-access/3.0.2-30719/Parallels Access.app/Contents/PkgInfo: Operation not permitted


==> Exit status of failed command:
#<Process::Status: pid 77976 exit 1>
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/system_command.rb:66:in `assert_success'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/system_command.rb:35:in `run!'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/system_command.rb:13:in `run'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/system_command.rb:17:in `run!'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/container/dmg.rb:75:in `block (2 levels) in extract_mount'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/tempfile.rb:324:in `open'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/container/dmg.rb:70:in `block in extract_mount'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/tempfile.rb:324:in `open'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/container/dmg.rb:67:in `extract_mount'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/container/dmg.rb:63:in `each'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/container/dmg.rb:63:in `extract_mounts'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/container/dmg.rb:25:in `extract'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/installer.rb:123:in `extract_primary_container'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/installer.rb:72:in `install'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli/install.rb:25:in `block in install_casks'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli/install.rb:19:in `each'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli/install.rb:19:in `install_casks'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli/install.rb:10:in `run'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:110:in `run_command'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:149:in `process'
/usr/local/Homebrew/Library/Homebrew/cask/cmd/brew-cask.rb:8:in `<top (required)>'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/usr/local/Homebrew/Library/Homebrew/brew.rb:24:in `require?'
/usr/local/Homebrew/Library/Homebrew/brew.rb:100:in `<main>'
Error: Kernel.exit
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:154:in `exit'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:154:in `rescue in process'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:144:in `process'
/usr/local/Homebrew/Library/Homebrew/cask/cmd/brew-cask.rb:8:in `<top (required)>'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/usr/local/Homebrew/Library/Homebrew/brew.rb:24:in `require?'
/usr/local/Homebrew/Library/Homebrew/brew.rb:100:in `<main>'

@LukasMa are you still having this issue?

Same problem:

Output of brew cask install parallels-access --verbose --debug

==> Loading Cask definitions
==> Translating 'parallels-access' into a valid Cask source
==> Testing source class Hbc::Source::URI
==> Testing source class Hbc::Source::PathSlashRequired
==> Testing source class Hbc::Source::TappedQualified
==> Testing source class Hbc::Source::UntappedQualified
==> Testing source class Hbc::Source::Tapped
==> Success! Using source class Hbc::Source::Tapped
==> Resolved Cask URI or file source to '/usr/local/Homebrew/Library/Taps/caskroom/homebrew-cask/Casks/parallels-access.rb'
==> Cask instance dumps in YAML:
==> Cask instance toplevel:
--- !ruby/object:Hbc::Cask
token: parallels-access
sourcefile_path: !ruby/object:Pathname
  path: /usr/local/Homebrew/Library/Taps/caskroom/homebrew-cask/Casks/parallels-access.rb
dsl: !ruby/object:Hbc::DSL {}
==> Cask instance method 'name':
---
- Parallels Access
==> Cask instance method 'homepage':
--- https://www.parallels.com/products/access/
...
==> Cask instance method 'url':
--- !ruby/object:Hbc::URL
uri: !ruby/object:URI::HTTPS
  scheme: https
  user: 
  password: 
  host: download.parallels.com
  port: 443
  path: /pmobile/v3/3.0.2/ParallelsAccess-3.0.2-30719-mac.dmg
  query: 
  opaque: 
  registry: 
  fragment: 
  parser: 
user_agent: 
cookies: 
referer: 
using: 
revision: 
trust_cert: 
data: 
==> Cask instance method 'appcast':
--- 
...
==> Cask instance method 'version':
--- !ruby/string:Hbc::DSL::Version
str: !binary |-
  My4wLjItMzA3MTk=
raw_version: 3.0.2-30719
==> Cask instance method 'sha256':
--- afafadd6f3e384c0e421b10eb827f83fa65b60206c938431c9c20083d6a0f252
...
==> Cask instance method 'artifacts':
---
:installer: !ruby/object:Set
  hash:
    ? !ruby/object:Hbc::DSL::Installer
      script:
        :args:
        - instance_install
        :sudo: true
        :executable: Parallels Access.app/Contents/MacOS/pm_ctl
    : true
:uninstall: !ruby/object:Set
  hash:
    ? :launchctl:
      - com.parallels.mobile.startgui.launchagent
      - com.parallels.mobile.dispatcher.launchdaemon
      - com.parallels.mobile.kextloader.launchdaemon
      - com.parallels.mobile.prl_deskctl_agent.launchagent
      :quit:
      - com.parallels.inputmethod.ParallelsIM
      :signal:
      - - TERM
        - com.parallels.mobile
      - - TERM
        - com.parallels.mobile.prl_deskctl_agent
      :kext:
      - com.parallels.virtualhid
      - com.parallels.virtualsound
      :delete: /Applications/Parallels Access.app
    : true
:zap: !ruby/object:Set
  hash:
    ? :delete:
      - ~/Library/Cookies/com.parallels.mobile.prl_deskctl_agent.binarycookies
      - ~/Library/Group Containers/4C6364ACXT.com.parallels.Access
      - ~/Library/Preferences/com.parallels.Parallels Access.plist
      - ~/Library/Preferences/com.parallels.Parallels Access.plist.sdb
      - ~/Library/Preferences/com.parallels.mobile.plist
    : true
==> Cask instance method 'caveats':
--- []
==> Cask instance method 'depends_on':
--- 
...
==> Cask instance method 'conflicts_with':
--- 
...
==> Cask instance method 'container':
--- 
...
==> Cask instance method 'gpg':
--- 
...
==> Cask instance method 'accessibility_access':
--- 
...
==> Cask instance method 'auto_updates':
--- 
...
==> Hbc::Installer#install
==> Printing caveats
==> Hbc::Installer#fetch
==> Downloading
==> Downloading https://download.parallels.com/pmobile/v3/3.0.2/ParallelsAccess-3.0.2-30719-mac.dmg
Already downloaded: /Users/lukasmalkmus/Library/Caches/Homebrew/Cask/parallels-access--3.0.2-30719.dmg
==> Downloaded to -> /Users/lukasmalkmus/Library/Caches/Homebrew/Cask/parallels-access--3.0.2-30719.dmg
==> Verifying download
==> Determining which verifications to run for Cask parallels-access
==> Checking for verification class Hbc::Verify::Checksum
==> 1 verifications defined
Hbc::Verify::Checksum
==> Running verification of class Hbc::Verify::Checksum
==> Verifying checksum for Cask parallels-access
==> SHA256 checksums match
==> Hbc::Installer#stage
==> Extracting primary container
==> Determining which containers to use based on filetype
==> Checking container class Hbc::Container::Pkg
==> Checking container class Hbc::Container::Ttf
==> Checking container class Hbc::Container::Otf
==> Checking container class Hbc::Container::Air
==> Checking container class Hbc::Container::Cab
==> Checking container class Hbc::Container::Dmg
==> Executing: ["/usr/bin/hdiutil", "imageinfo", "/Users/lukasmalkmus/Library/Caches/Homebrew/Cask/parallels-access--3.0.2-30719.dmg"]
==> Using container class Hbc::Container::Dmg for /Users/lukasmalkmus/Library/Caches/Homebrew/Cask/parallels-access--3.0.2-30719.dmg
==> Executing: ["/usr/bin/hdiutil", "mount", "-plist", "-nobrowse", "-readonly", "-noidme", "-mountrandom", "/tmp", "/Users/lukasmalkmus/Library/Caches/Homebrew/Cask/parallels-access--3.0.2-30719.dmg"]
==> Executing: ["/usr/bin/mkbom", "-s", "-i", "/var/folders/dy/s6dd70892l35f0444cwt96t40000gn/T/20170106-55674-1dnu4gn.list", "--", "/var/folders/dy/s6dd70892l35f0444cwt96t40000gn/T/20170106-55674-1qwoaow.bom"]
==> Executing: ["/usr/bin/ditto", "--bom", "/var/folders/dy/s6dd70892l35f0444cwt96t40000gn/T/20170106-55674-1qwoaow.bom", "--", "/private/tmp/dmg.pfYus3", "/usr/local/Caskroom/parallels-access/3.0.2-30719"]
==> ditto: /usr/local/Caskroom/parallels-access/3.0.2-30719/Parallels Access.app/Contents/PkgInfo: Operation not permitted
==> Executing: ["/usr/sbin/diskutil", "eject", "/private/tmp/dmg.pfYus3"]
==> Purging files for version 3.0.2-30719 of Cask parallels-access

After some testing, I believe I may have found the problem. Downloading the .dmg file manually I found it contains a single file, namely Install.app. If I move the .app out of the .dmg and try to run it, I get the following error:

screen shot 2017-01-07 at 1 53 09 am

So you must run the Install.app from inside the .dmg.

Now, I _think_ when a Cask downloads a .dmg, it extracts everything and then attempts to run whatever it needs to run, hence why the parallels-access Cask is failing.

@vitorgalvao does that sound logical?

@miccal If you look inside the mounted dmg (ls '/Volumes/Parallels Access'), you鈥檒l see other files, among them Parallels Access.app which is what we use to install. We bypass Install.app.

To verify this, we should run that install script manually both when the app is inside the dmg and outside, and see the difference.

@vitorgalvao I would never have thought that an app inside a dmg would be hidden. Learning a lot this week!

-bash-4.4.5- /Users/raesy [> cd "/Volumes/Parallels Access/Parallels Access.app/Contents/MacOS"
-bash-4.4.5- /Volumes/Parallels Access/Parallels Access.app/Contents/MacOS [> ls
CookieReader                Parallels Service           pm_ctl                  prl_sound_usage
Parallels Access Agent.app      pax_updater_ctl             prl_deskctl_wizard
Parallels Access Dispatcher Service.app paxctl                  prl_perf_ctl
-bash-4.4.5- /Volumes/Parallels Access/Parallels Access.app/Contents/MacOS [> sudo bash pm_ctl instance_install
Password:
Jan  7 12:06:22  pm_ctl[500] <Error>: Parallels Access seems not to be installed
ditto: /Applications/Parallels Access.app/Contents/PkgInfo: Operation not permitted
chown: /Applications/Parallels Access.app/Contents/Library/Extensions/10.9/prl_virtual_hid.kext/Contents/_CodeSignature/CodeResources: Operation not permitted
chown: /Applications/Parallels Access.app/Contents/Library/Extensions/10.9/prl_virtual_hid.kext/Contents/_CodeSignature: Operation not permitted
chown: /Applications/Parallels Access.app/Contents/Library/Extensions/10.9/prl_virtual_hid.kext/Contents/Info.plist: Operation not permitted
chown: /Applications/Parallels Access.app/Contents/Library/Extensions/10.9/prl_virtual_hid.kext/Contents/MacOS/prl_virtual_hid: Operation not permitted
chown: /Applications/Parallels Access.app/Contents/Library/Extensions/10.9/prl_virtual_hid.kext/Contents/MacOS: Operation not permitted
chown: /Applications/Parallels Access.app/Contents/Library/Extensions/10.9/prl_virtual_hid.kext/Contents: Operation not permitted
chown: /Applications/Parallels Access.app/Contents/Library/Extensions/10.9/prl_virtual_hid.kext: Operation not permitted
chown: /Applications/Parallels Access.app/Contents/Library/Extensions/10.9/prl_virtual_sound.kext/Contents/_CodeSignature/CodeResources: Operation not permitted
chown: /Applications/Parallels Access.app/Contents/Library/Extensions/10.9/prl_virtual_sound.kext/Contents/_CodeSignature: Operation not permitted
chown: /Applications/Parallels Access.app/Contents/Library/Extensions/10.9/prl_virtual_sound.kext/Contents/Info.plist: Operation not permitted
chown: /Applications/Parallels Access.app/Contents/Library/Extensions/10.9/prl_virtual_sound.kext/Contents/MacOS/prl_virtual_sound: Operation not permitted
chown: /Applications/Parallels Access.app/Contents/Library/Extensions/10.9/prl_virtual_sound.kext/Contents/MacOS: Operation not permitted
chown: /Applications/Parallels Access.app/Contents/Library/Extensions/10.9/prl_virtual_sound.kext/Contents: Operation not permitted
chown: /Applications/Parallels Access.app/Contents/Library/Extensions/10.9/prl_virtual_sound.kext: Operation not permitted
chown: /Applications/Parallels Access.app/Contents/Library/Extensions/10.9: Operation not permitted
chgrp: you are not a member of group accessibility
chown: /Applications/Parallels Access.app/Contents/MacOS/Parallels Service: Operation not permitted
Jan  7 12:06:25  pm_ctl[532] <Info>: Writing Stat Info about installation 
pm_ctl: line 340: /var/db/Parallels/Stats/Parallels Access.3.1.5: Permission denied
mkdir: /Library/Preferences/Parallels: Permission denied
Jan  7 12:06:25  pm_ctl[536] <Error>: Failed to store bundle location

Running the install script manually produces the same error:

ditto: /Applications/Parallels Access.app/Contents/PkgInfo: Operation not permitted

BUT Parallels Access installs correctly and is working (as far as I can tell without a Parallels account).

Would adding must_succeed: false fix this issue?

Would adding must_succeed: false fix this issue?

Still waiting on Veertu to be able to use VMs again, so can鈥檛 test yet. Care to spin one? Or maybe you can do it, @LukasMa?

@vitorgalvao Okay, so you want me to edit the parallels-access recipe, add must_succeed: false and try installation again?

Okay, so you want me to edit the parallels-access recipe, add must_succeed: false and try installation again?

Yes. So brew cask edit parallels-access, and add must_succeed: false to the installer part.

Ok, not at home on my Mac, will report tomorrow.

Yes. So brew cask edit parallels-access, and add must_succeed: false to the installer part.

Did not work, unfortunately - same error:

==> Failed command:
/usr/bin/ditto --bom /var/folders/4w/l_n7g7157qzcg9vlxrwkbgzr0000gn/T/20170108-7863-7oso9s.bom -- /private/tmp/dmg.vGZmwO #<Pathname:/usr/local/Caskroom/parallels-access/3.1.5-31304>
==> Standard Error of failed command:
ditto: /usr/local/Caskroom/parallels-access/3.1.5-31304/Parallels Access.app/Contents/PkgInfo: Operation not permitted

We should run that install script manually both when the app is inside the dmg and outside, and see the difference.

I updated the Cask file locally to the latest version (3.1.5-31304), moved the app from the cache dmg to another location, and ran the install script manually:

Jan  8 12:10:38  pm_ctl[7988] <Info>: Check 'prl_virtual_sound' versions: loaded '1.0.36 36', new '1.0.36 36' 
Jan  8 12:10:38  pm_ctl[7989] <Info>: Kext 'prl_virtual_sound' update should be skipped 
Jan  8 12:10:38  pm_ctl[7991] <Error>: Parallels Access seems not to be installed
Jan  8 12:10:38  pm_ctl[7999] <Error>: Launch agent com.parallels.mobile.prl_deskctl_agent.launchagent failed to unload
Jan  8 12:10:38  pm_ctl[8000] <Error>: Launch agent com.parallels.mobile.prl_deskctl_agent.launchagent failed to unload
ditto: /Applications/Parallels Access.app/Contents/PkgInfo: Operation not permitted
Jan  8 12:10:41  pm_ctl[8025] <Info>: Writing Stat Info about installation 
Jan  8 12:10:41  pm_ctl[8038] <Info>: Users saved RunAtLoad mode is set to:  
/Library/LaunchDaemons/com.parallels.mobile.dispatcher.launchdaemon.plist: service already loaded
/Library/LaunchAgents/com.parallels.mobile.prl_deskctl_agent.launchagent.plist: service already loaded
Jan  8 12:10:41  pm_ctl[8052] <Info>: Creating directory for prl_deskctl_wizards .pid files 
Jan  8 12:10:42  pm_ctl[8060] <Info>: Check 'prl_virtual_sound' versions: loaded '1.0.36 36', new '1.0.36 36' 
Jan  8 12:10:42  pm_ctl[8061] <Info>: Kext 'prl_virtual_sound' update should be skipped 
Jan  8 12:10:42  pm_ctl[8070] <Info>: Check 'prl_virtual_hid' versions: loaded '1.0.3 3', new '1.0.3 3' 
Jan  8 12:10:42  pm_ctl[8071] <Info>: Kext 'prl_virtual_hid' update should be skipped 
/Library/LaunchDaemons/com.parallels.mobile.kextloader.launchdaemon.plist: service already loaded
Jan  8 12:10:42  pm_ctl[8079] <Info>: Enabling Parallels input method 
Jan  8 12:10:44  pm_ctl[8095] <Info>: No Deploy ID. Using Old-way init. 
Jan  8 12:10:44  pm_ctl[8096] <Info>: Trying to load Parallels kernel extensions, exit status: . 
ln: /usr/bin/paxctl: Operation not permitted
pm_ctl: line 66: ((: == 10 : syntax error: operand expected (error token is "== 10 ")
Jan  8 12:10:44  pm_ctl[8101] <Error>: PAX is not listed in database but Sqlite3 is available. Adding fields.
Error: table access has 7 columns but 6 values were supplied

Note the same error:

ditto: /Applications/Parallels Access.app/Contents/PkgInfo: Operation not permitted

but the install was successful, as before.

To debug further, I played around with the args for the install script: and kept getting the same error, which did not make any sense. Looking at @LukasMa's output of brew cask install parallels-access --verbose --debug given above, I believe the error is happening _before_ the install script: is being called:

==> Extracting primary container
==> Determining which containers to use based on filetype
==> Checking container class Hbc::Container::Pkg
==> Checking container class Hbc::Container::Ttf
==> Checking container class Hbc::Container::Otf
==> Checking container class Hbc::Container::Air
==> Checking container class Hbc::Container::Cab
==> Checking container class Hbc::Container::Dmg
==> Executing: ["/usr/bin/hdiutil", "imageinfo", "/Users/lukasmalkmus/Library/Caches/Homebrew/Cask/parallels-access--3.0.2-30719.dmg"]
==> Using container class Hbc::Container::Dmg for /Users/lukasmalkmus/Library/Caches/Homebrew/Cask/parallels-access--3.0.2-30719.dmg
==> Executing: ["/usr/bin/hdiutil", "mount", "-plist", "-nobrowse", "-readonly", "-noidme", "-mountrandom", "/tmp", "/Users/lukasmalkmus/Library/Caches/Homebrew/Cask/parallels-access--3.0.2-30719.dmg"]
==> Executing: ["/usr/bin/mkbom", "-s", "-i", "/var/folders/dy/s6dd70892l35f0444cwt96t40000gn/T/20161119-77500-1ke6mkj.list", "--", "/var/folders/dy/s6dd70892l35f0444cwt96t40000gn/T/20161119-77500-k156h2.bom"]
==> Executing: ["/usr/bin/ditto", "--bom", "/var/folders/dy/s6dd70892l35f0444cwt96t40000gn/T/20161119-77500-k156h2.bom", "--", "/private/tmp/dmg.9z8wfw", "/usr/local/Caskroom/parallels-access/3.0.2-30719"]
==> ditto: /usr/local/Caskroom/parallels-access/3.0.2-30719/Parallels Access.app/Contents/PkgInfo: Operation not permitted
==> Executing: ["/usr/sbin/diskutil", "eject", "/private/tmp/dmg.9z8wfw"]
==> Purging files for version 3.0.2-30719 of Cask parallels-access
Error: Command failed to execute!
==> Failed command:
/usr/bin/ditto --bom /var/folders/dy/s6dd70892l35f0444cwt96t40000gn/T/20161119-77500-k156h2.bom -- /private/tmp/dmg.9z8wfw #<Pathname:/usr/local/Caskroom/parallels-access/3.0.2-30719>
==> Standard Error of failed command:
ditto: /usr/local/Caskroom/parallels-access/3.0.2-30719/Parallels Access.app/Contents/PkgInfo: Operation not permitted

Sorry, but I do not know where to go from here?

Still waiting on Veertu to be able to use VMs again, so can鈥檛 test yet.

What are you waiting for, support for Sierra? When it happens, I would be interested to know how you do this for testing - my "testing machine" is actually my wife's computer (which is in fact my old MacBook Pro), and I do not think she appreciates me using her computer as a "guinea pig".

What are you waiting for, support for Sierra?

I鈥檓 waiting for them to support macOS guests (they currently only support Linux and Windows guests). I鈥檝e been waiting for it for months. They eventually gave an ETA of two months. That was four months ago. These things take time and they ran into some delays, so definitely not criticising. Last time I asked (December) they were hoping for a private beta this month to me made public shortly after.

I do have an old VMWare Fusion license, but they essentially ask for you to pay for it again every year (not explicitly a subscription service, but might as well be), and that cost is a bit high to justify since I only use it for this (free open-source work). Still, my old version was still working (had to install old macOS versions on it and upgrade from the VM itself, instead of doing clean installs), though worse each time. Eventually (not sure what changed) running VMWare Fusion started freezing my machine forcing me to force reboot, so I abandoned it completely.

VMWare Fusion鈥檚 original team ended up essentially getting the axe anyway (before the freezing problems), so I don鈥檛 see it as an option. I also don鈥檛 like Parallels (and it is/was even more expensive).

Veertu is now the best option. Relatively cheap, and since it uses Apple鈥檚 own Hypervisor.framework it won鈥檛 need serious updates with new macOS versions, meaning they shouldn鈥檛 keep asking for money.

Interesting, thank for your detailed answer.

@miccal I think I missed something. Can you explain me the exact steps you made? I can't reproduce the behaviour you're talking about.

So brew cask edit parallels-access, and add must_succeed: false to the installer part.

That's what I did and I still get the same error and the installation isn't successfull.

@LukasMa what behaviour are you referring to?

As far as I understood, you were able to modify the installation script in a way which makes the installation actually succeed while still getting the same error message.
Or have I completely misunderstood you?

Yes you have misunderstood - I was running the install script included with the app manually, completely outside Cask.

OK, I am certain this is a problem with Cask itself, not the parallels-access.rb Cask file.

For proof, I ran brew cask edit parallels-access and changed parallels-access.rb to the following:

cask 'parallels-access' do
  version '3.0.2-30719'
  sha256 'afafadd6f3e384c0e421b10eb827f83fa65b60206c938431c9c20083d6a0f252'

  url "https://download.parallels.com/pmobile/v#{version.major}/#{version.major_minor_patch}/ParallelsAccess-#{version}-mac.dmg"
  name 'Parallels Access'
  homepage 'https://www.parallels.com/products/access/'

  stage_only true
end

which should do nothing but migrate the dmg contents to the Caskroom (like the libreoffice-language-pack.rb Cask).

Then brew cask install parallels-access fails as before:

-bash-4.4.5- /Users/miccal [> brew cask install parallels-access
==> Downloading https://download.parallels.com/pmobile/v3/3.0.2/ParallelsAccess-3.0.2-30719-mac.dmg
######################################################################## 100.0%
==> Verifying checksum for Cask parallels-access
==> ditto: /usr/local/Caskroom/parallels-access/3.0.2-30719/Parallels Access.app/Contents/PkgInfo: Operation not permitted
Error: Command failed to execute!
==> Failed command:
/usr/bin/ditto --bom /var/folders/nd/58wf_rj13b3b0tcvk0vq30zc0000gn/T/20170110-21873-jvfkxk.bom -- /private/tmp/dmg.zmgxZ8 #<Pathname:/usr/local/Caskroom/parallels-access/3.0.2-30719>
==> Standard Output of failed command:
==> Standard Error of failed command:
ditto: /usr/local/Caskroom/parallels-access/3.0.2-30719/Parallels Access.app/Contents/PkgInfo: Operation not permitted
==> Exit status of failed command:
#<Process::Status: pid 22056 exit 1>
Error: nothing to install
-bash-4.4.5- /Users/miccal [>

Ping @reitermarkus for any advice.

@miccal I can reproduce this with stage_only on the latest version.

cask 'parallels-access' do
  version '3.1.6-31326'
  sha256 '1713e25c009785bb53f8eb1d193155a4c401ebba4361ce577e3e5c16f3ce787e'

  url "https://download.parallels.com/pmobile/v#{version.major}/#{version}/ParallelsAccess-#{version}-mac.dmg"
  name 'Parallels Access'
  homepage 'https://www.parallels.com/products/access/'

  stage_only true
end
brew cask install parallels-access.rb --verbose --debug ==> Hbc::Installer#install ==> Printing caveats ==> Hbc::Installer#fetch ==> Downloading ==> Downloading https://download.parallels.com/pmobile/v3/3.1.6-31326/ParallelsAccess-3.1.6-31326-mac.dmg Already downloaded: /Users/commitay/Library/Caches/Homebrew/Cask/parallels-access--3.1.6-31326.dmg ==> Downloaded to -> /Users/commitay/Library/Caches/Homebrew/Cask/parallels-access--3.1.6-31326.dmg ==> Verifying download ==> Determining which verifications to run for Cask parallels-access ==> Checking for verification class Hbc::Verify::Checksum ==> 1 verifications defined Hbc::Verify::Checksum ==> Running verification of class Hbc::Verify::Checksum ==> Verifying checksum for Cask parallels-access ==> SHA256 checksums match ==> Hbc::Installer#stage ==> Extracting primary container ==> Determining which containers to use based on filetype ==> Checking container class Hbc::Container::Pkg ==> Checking container class Hbc::Container::Ttf ==> Checking container class Hbc::Container::Otf ==> Checking container class Hbc::Container::Air ==> Checking container class Hbc::Container::Cab ==> Checking container class Hbc::Container::Dmg ==> Executing: ["/usr/bin/hdiutil", "imageinfo", "/Users/commitay/Library/Caches/Homebrew/Cask/parallels-access--3.1.6-31326.dmg"] ==> Using container class Hbc::Container::Dmg for /Users/commitay/Library/Caches/Homebrew/Cask/parallels-access--3.1.6-31326.dmg ==> Executing: ["/usr/bin/hdiutil", "mount", "-plist", "-nobrowse", "-readonly", "-noidme", "-mountrandom", "/tmp", "/Users/commitay/Library/Caches/Homebrew/Cask/parallels-access--3.1.6-31326.dmg"] ==> Executing: ["/usr/bin/mkbom", "-s", "-i", "/var/folders/t5/btq1kqfx15q3h9f6xvb0bk6c0000gn/T/20170409-5642-10k7omf.list", "--", "/var/folders/t5/btq1kqfx15q3h9f6xvb0bk6c0000gn/T/20170409-5642-5qi489.bom"] ==> Executing: ["/usr/bin/ditto", "--bom", "/var/folders/t5/btq1kqfx15q3h9f6xvb0bk6c0000gn/T/20170409-5642-5qi489.bom", "--", "/private/tmp/dmg.JeTdcp", "/usr/local/Caskroom/parallels-access/3.1.6-31326"] ==> ditto: /usr/local/Caskroom/parallels-access/3.1.6-31326/Parallels Access.app/Contents/PkgInfo: Operation not permitted ==> Executing: ["/usr/sbin/diskutil", "eject", "/private/tmp/dmg.JeTdcp"] ==> Purging files for version 3.1.6-31326 of Cask parallels-access Error: Command failed to execute! ==> Failed command: /usr/bin/ditto --bom /var/folders/t5/btq1kqfx15q3h9f6xvb0bk6c0000gn/T/20170409-5642-5qi489.bom -- /private/tmp/dmg.JeTdcp # ==> Standard Output of failed command: ==> Standard Error of failed command: ditto: /usr/local/Caskroom/parallels-access/3.1.6-31326/Parallels Access.app/Contents/PkgInfo: Operation not permitted ==> Exit status of failed command: # Error: nothing to install/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli/install.rb:13:in `run' /usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:115:in `run_command' /usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:158:in `process' /usr/local/Homebrew/Library/Homebrew/cmd/cask.rb:8:in `cask' /usr/local/Homebrew/Library/Homebrew/brew.rb:91:in `
' Error: Kernel.exit /usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:163:in `exit' /usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:163:in `rescue in process' /usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:149:in `process' /usr/local/Homebrew/Library/Homebrew/cmd/cask.rb:8:in `cask' /usr/local/Homebrew/Library/Homebrew/brew.rb:91:in `
'

OK, I am certain this is a problem with Cask itself, not the parallels-access.rb Cask file.

I agree with your assessment, it is cask failing. This command is where it fails but as it works for (almost) all the other .dmg installs in caskroom, I think it must be something parallels has done.

Was this page helpful?
0 / 5 - 0 ratings