Hello,

Welcome to Vagrant linux and all that stuff :D

he lock error literally is just saying "this user can't do this.."

With some practice and after lots of error you will learn to read what that
means.. "the user your are using cant do .."

So basically here, the command you are running is meant to be run as root
and not as the user you are using

sudo <command> should fix the issue.,

the sudo need to be inside the script that is being run.

If you can share your Vagranfile and the script that is being run, I can
help you more.

Alvaro.



On Fri, Mar 18, 2016 at 11:50 AM, evrim Alacan <[email protected]>
wrote:

> Hi all, this is going to be my first question about linux since I just
> started to use it. So tell me if I need to tell more for you to help me.
>
>
> This is my uname -a:                 Linux EvrimAlacan 3.19.0-32-generic
> #37~14.04.1-Ubuntu SMP Thu Oct 22 09:41:40 UTC 2015 x86_64 x86_64 x86_64
> GNU/Linux
>
> I'm using VirtualBox version :    5.0.4_LinuxMintr102546
>
> Vagrant Version :                      Vagrant 1.8.1
>
>
> Before Linux I was using my windows to do my work and then I decided to
> dual-boot my computer into a linux, and I choosed Linux Mint because it
> seems the best to me.
> But unfortunately when I 'vagrant up', bootstrap.sh which does all the job
> about configurations on guest machine, does nothing. Because of the
> following problem:
>
> ==> default: E: Could not open lock file /var/lib/apt/lists/lock - open
> (1: Operation not permitted)
> ==> default: E: Unable to lock directory /var/lib/apt/lists/
>
> I know, this problem is about permissions. Also this error is all over the
> command prompt since bootstrap.sh commits more installations and fails.
> If I type 'sudo vagrant up', It will install all the packages, but as
> expected the virtual machine will not show up because the owner will be the
> 'root', not me.
> Whatever I did, I couldn't solve this. I get into it with 'vagrant ssh'. I
> tried to take the first line from 'bootstrap.sh' which is 'apt-get update'.
> Tried to run it manually.
> I typed 'sudo apt-get update', but It still gave me an error saying I
> don't have permission. I tried this with 'sudo su' as well.
>
> Here is what I get with 'sudo visudo' on guest machine:
>
>
> #
> # This file MUST be edited with the 'visudo' command as root.
> #
> # Please consider adding local content in /etc/sudoers.d/ instead of
> # directly modifying this file.
> #
> # See the man page for details on how to write a sudoers file.
> #
> Defaults        env_reset
> Defaults        exempt_group=admin
> Defaults
>  secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
>
> # Host alias specification
>
> # User alias specification
>
> # Cmnd alias specification
>
> # User privilege specification
> root    ALL=(ALL:ALL) ALL
>
> # Members of the admin group may gain root privileges
> %admin ALL=(ALL) NOPASSWD:ALL
>
> # Allow members of group sudo to execute any command
> %sudo   ALL=(ALL:ALL) ALL
>
> # See sudoers(5) for more information on "#include" directives:
>
> #includedir /etc/sudoers.d
>
> I can't even delete the 'lock' file by any means, I tried everything.
> Changing the parent permissions to 777, didn't work as well. I looked on
> the internet about 'immutable' thing,
> found a command to check the file whether it is immutable or not, but I
> don't even have a permission for it, even if I'm root. I don't know whats
> wrong...
>
> I much appreciate any help
>
>
>
>
> --
> This mailing list is governed under the HashiCorp Community Guidelines -
> https://www.hashicorp.com/community-guidelines.html. Behavior in
> violation of those guidelines may result in your removal from this mailing
> list.
>
> GitHub Issues: https://github.com/mitchellh/vagrant/issues
> IRC: #vagrant on Freenode
> ---
> You received this message because you are subscribed to the Google Groups
> "Vagrant" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/vagrant-up/56c2d318-349f-4880-aada-4360ec3e4084%40googlegroups.com
> <https://groups.google.com/d/msgid/vagrant-up/56c2d318-349f-4880-aada-4360ec3e4084%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vagrant-up/CAHqq0ey6tWsbaGoepKNWmmQ%2BEh4u07-rs%3DfOg79T2v6dA7GLig%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to