rodjek / librarian-puppet

http://librarian-puppet.com
MIT License
692 stars 209 forks source link

`unlink': Operation not permitted #341

Open entheologist opened 7 years ago

entheologist commented 7 years ago

I couldn't get librarian-puppet to work on Windows, so instead I tried installing it inside the Vagrant VM so I can create the modules through the shared directory. It installed some modules, so it definitely works better, but I quickly ran into another problem. When I run install now, heres what happens:

vagrant@ubuntu:/vagrant/puppet$ librarian-puppet install --no-use-v1-api
/usr/lib/ruby/1.9.1/fileutils.rb:1406:in `unlink': Operation not permitted - /vagrant/puppet/modules/stdlib/CHANGELOG.md (Errno::EPERM)

Full stack trace:

vagrant@ubuntu:/vagrant/puppet$ librarian-puppet install --no-use-v1-api
/usr/lib/ruby/1.9.1/fileutils.rb:1406:in `unlink': Operation not permitted - /vagrant/puppet/modules/stdlib/CHANGELOG.md (Errno::EPERM)
        from /usr/lib/ruby/1.9.1/fileutils.rb:1406:in `block in remove_file'
        from /usr/lib/ruby/1.9.1/fileutils.rb:1411:in `platform_support'
        from /usr/lib/ruby/1.9.1/fileutils.rb:1405:in `remove_file'
        from /usr/lib/ruby/1.9.1/fileutils.rb:1394:in `remove'
        from /usr/lib/ruby/1.9.1/fileutils.rb:770:in `block in remove_entry'
        from /usr/lib/ruby/1.9.1/fileutils.rb:1444:in `block (2 levels) in postorder_traverse'
        from /usr/lib/ruby/1.9.1/fileutils.rb:1448:in `postorder_traverse'
        from /usr/lib/ruby/1.9.1/fileutils.rb:1443:in `block in postorder_traverse'
        from /usr/lib/ruby/1.9.1/fileutils.rb:1442:in `each'
        from /usr/lib/ruby/1.9.1/fileutils.rb:1442:in `postorder_traverse'
        from /usr/lib/ruby/1.9.1/fileutils.rb:768:in `remove_entry'
        from /usr/lib/ruby/1.9.1/fileutils.rb:626:in `block in rm_r'
        from /usr/lib/ruby/1.9.1/fileutils.rb:622:in `each'
        from /usr/lib/ruby/1.9.1/fileutils.rb:622:in `rm_r'
        from /usr/lib/ruby/1.9.1/pathname.rb:523:in `rmtree'
        from /var/lib/gems/1.9.1/gems/librarian-puppet-2.2.3/lib/librarian/puppet/source/forge/repo.rb:59:in `install_version!'
        from /var/lib/gems/1.9.1/gems/librarian-puppet-2.2.3/lib/librarian/puppet/source/forge.rb:114:in `install!'
        from /var/lib/gems/1.9.1/gems/librarianp-0.6.3/lib/librarian/manifest.rb:73:in `install!'
        from /var/lib/gems/1.9.1/gems/librarianp-0.6.3/lib/librarian/action/install.rb:49:in `block in install_manifests'
        from /var/lib/gems/1.9.1/gems/librarianp-0.6.3/lib/librarian/action/install.rb:48:in `each'
        from /var/lib/gems/1.9.1/gems/librarianp-0.6.3/lib/librarian/action/install.rb:48:in `install_manifests'
        from /var/lib/gems/1.9.1/gems/librarianp-0.6.3/lib/librarian/action/install.rb:39:in `perform_installation'
        from /var/lib/gems/1.9.1/gems/librarianp-0.6.3/lib/librarian/action/install.rb:12:in `run'
        from /var/lib/gems/1.9.1/gems/librarian-puppet-2.2.3/lib/librarian/puppet/cli.rb:101:in `install!'
        from /var/lib/gems/1.9.1/gems/librarian-puppet-2.2.3/lib/librarian/puppet/cli.rb:70:in `install'
        from /var/lib/gems/1.9.1/gems/thor-0.19.4/lib/thor/command.rb:27:in `run'
        from /var/lib/gems/1.9.1/gems/thor-0.19.4/lib/thor/invocation.rb:126:in `invoke_command'
        from /var/lib/gems/1.9.1/gems/thor-0.19.4/lib/thor.rb:369:in `dispatch'
        from /var/lib/gems/1.9.1/gems/thor-0.19.4/lib/thor/base.rb:444:in `start'
        from /var/lib/gems/1.9.1/gems/librarianp-0.6.3/lib/librarian/cli.rb:26:in `block (2 levels) in bin!'
        from /var/lib/gems/1.9.1/gems/librarianp-0.6.3/lib/librarian/cli.rb:31:in `returning_status'
        from /var/lib/gems/1.9.1/gems/librarianp-0.6.3/lib/librarian/cli.rb:26:in `block in bin!'
        from /var/lib/gems/1.9.1/gems/librarianp-0.6.3/lib/librarian/cli.rb:47:in `with_environment'
        from /var/lib/gems/1.9.1/gems/librarianp-0.6.3/lib/librarian/cli.rb:26:in `bin!'
        from /var/lib/gems/1.9.1/gems/librarian-puppet-2.2.3/bin/librarian-puppet:7:in `<top (required)>'
        from /usr/local/bin/librarian-puppet:23:in `load'
        from /usr/local/bin/librarian-puppet:23:in `<main>'

The VM is running Ubuntu 14. I tried running it with sudo, but no difference.

Xylakant commented 7 years ago

First of all, you may want to read this note on the readme: https://github.com/rodjek/librarian-puppet#note-this-project-has-moved-to-httpsgithubcomvoxpupulilibrarian-puppet

Second: This looks a lot like you're using virtualbox shared folders and permissions on those folders may be tricky. You might want to retry in a folder inside the VM that is not mounted from the host system.