Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error on Fedora #2

Closed
greg0ire opened this issue May 27, 2016 · 33 comments
Closed

error on Fedora #2

greg0ire opened this issue May 27, 2016 · 33 comments

Comments

@greg0ire
Copy link
Contributor

/usr/share/vagrant/lib/vagrant/pre-rubygems.rb:19:in `require_relative': /usr/share/vagrant/lib/vagrant/bundler.rb:217: syntax error, unexpected tPOW (SyntaxError)
    def internal_install(plugins, update, **extra)
                                            ^
/usr/share/vagrant/lib/vagrant/bundler.rb:298: class definition in method body
/usr/share/vagrant/lib/vagrant/bundler.rb:315: class definition in method body
/usr/share/vagrant/lib/vagrant/bundler.rb:368: syntax error, unexpected keyword_end, expecting $end
    from /usr/share/vagrant/lib/vagrant/pre-rubygems.rb:19:in `<main>'

No luck 😕

@jordisala1991
Copy link
Owner

What version of vagrant do you use?

@greg0ire
Copy link
Contributor Author

Hum, this is more like a Fedora specific problem :

agrant --version
/usr/share/vagrant/lib/vagrant/pre-rubygems.rb:19:in `require_relative': /usr/share/vagrant/lib/vagrant/bundler.rb:217: syntax error, unexpected tPOW (SyntaxError)
    def internal_install(plugins, update, **extra)
                                            ^
/usr/share/vagrant/lib/vagrant/bundler.rb:298: class definition in method body
/usr/share/vagrant/lib/vagrant/bundler.rb:315: class definition in method body
/usr/share/vagrant/lib/vagrant/bundler.rb:368: syntax error, unexpected keyword_end, expecting $end
    from /usr/share/vagrant/lib/vagrant/pre-rubygems.rb:19:in `<main>'

@greg0ire
Copy link
Contributor Author

I have a lead : http://blog.kragniz.eu/vagrant-fedora-21/

@jordisala1991
Copy link
Owner

Wow, you had to compile your own Vagrant in fedora < 21?

@greg0ire
Copy link
Contributor Author

Looks like it. Or maybe there were no official packages…

At the moment, I'm stuck a bit further :

Bringing machine 'default' up with 'libvirt' provider...
Error while connecting to libvirt: Error making a connection to libvirt URI qemu:///system?no_verify=1&keyfile=/home/greg/.ssh/id_rsa:
Call to virConnectOpen failed: l'authentification a échoué : no agent is available to authenticate

@jordisala1991
Copy link
Owner

Can you try this?

eval `ssh-agent -s`

@greg0ire
Copy link
Contributor Author

I am installing qemu right now, I figured it might be needed. And my ssh-agent is already set up (it is set up when I open my first terminal).

@greg0ire
Copy link
Contributor Author

Hum… no progress with either lead.

@greg0ire
Copy link
Contributor Author

@jordisala1991
Copy link
Owner

vagrant-libvirt/vagrant-libvirt#45

Maybe here?

@greg0ire
Copy link
Contributor Author

Better :

Bringing machine 'default' up with 'libvirt' provider...
==> default: Box 'ubuntu/trusty64' could not be found. Attempting to find and install...
    default: Box Provider: libvirt
    default: Box Version: >= 0
==> default: Loading metadata for box 'ubuntu/trusty64'
    default: URL: https://atlas.hashicorp.com/ubuntu/trusty64
The box you're attempting to add doesn't support the provider
you requested. Please find an alternate box or use an alternate
provider. Double-check your requested provider to verify you didn't
simply misspell it.

If you're adding a box from HashiCorp's Atlas, make sure the box is
released.

Name: ubuntu/trusty64
Address: https://atlas.hashicorp.com/ubuntu/trusty64
Requested provider: [:libvirt]

@jordisala1991
Copy link
Owner

Huh, so you are using libvirt instead of VirtualBox?

@greg0ire
Copy link
Contributor Author

I have no idea what I'm doing :P I use docker usually…

@jordisala1991
Copy link
Owner

:(

I'm trying to make this work with only docker, but it's still a WIP

Can you change in Vagrantfile:

config.vm.box = 'ubuntu/trusty64'

to

config.vm.box = 's3than/trusty64'

@greg0ire
Copy link
Contributor Author

It's downloading an image :)

@greg0ire
Copy link
Contributor Author

ETA 3 mn… gonna brush my teeth :)

@greg0ire
Copy link
Contributor Author

Huh, it looks stuck :

Bringing machine 'default' up with 'libvirt' provider...
==> default: Box 's3than/trusty64' could not be found. Attempting to find and install...
    default: Box Provider: libvirt
    default: Box Version: >= 0
==> default: Loading metadata for box 's3than/trusty64'
    default: URL: https://atlas.hashicorp.com/s3than/trusty64
==> default: Adding box 's3than/trusty64' (v0.0.1) for provider: libvirt
    default: Downloading: https://atlas.hashicorp.com/s3than/boxes/trusty64/versions/0.0.1/providers/libvirt.box
==> default: Successfully added box 's3than/trusty64' (v0.0.1) for 'libvirt'!
==> default: Uploading base box image as volume into libvirt storage...
==> default: Creating image (snapshot of base box volume).
==> default: Creating domain with the following settings...
==> default:  -- Name:              ArchetypeSonata_default
==> default:  -- Domain type:       kvm
==> default:  -- Cpus:              1
==> default:  -- Memory:            512M
==> default:  -- Management MAC:    
==> default:  -- Loader:            
==> default:  -- Base box:          s3than/trusty64
==> default:  -- Storage pool:      default
==> default:  -- Image:             /var/lib/libvirt/images/ArchetypeSonata_default.img (40G)
==> default:  -- Volume Cache:      default
==> default:  -- Kernel:            
==> default:  -- Initrd:            
==> default:  -- Graphics Type:     vnc
==> default:  -- Graphics Port:     5900
==> default:  -- Graphics IP:       127.0.0.1
==> default:  -- Graphics Password: Not defined
==> default:  -- Video Type:        cirrus
==> default:  -- Video VRAM:        9216
==> default:  -- Keymap:            en-us
==> default:  -- INPUT:             type=mouse, bus=ps2
==> default:  -- Command line : 
==> default: Creating shared folders metadata...
==> default: Starting domain.
==> default: Waiting for domain to get an IP address...
==> default: Waiting for SSH to become available...
    default: 
    default: Vagrant insecure key detected. Vagrant will automatically replace
    default: this with a newly generated keypair for better security.
    default: 
    default: Inserting generated public key within guest...
    default: Removing insecure key from the guest if it's present...
    default: Key inserted! Disconnecting and reconnecting using new SSH key...
==> default: Configuring and enabling network interfaces...
==> default: Exporting NFS shared folders...
==> default: Preparing to edit /etc/exports. Administrator privileges will be required...
[sudo] password for greg: 
Redirecting to /bin/systemctl status  nfs-server.service
● nfs-server.service - NFS server and services
   Loaded: loaded (/usr/lib/systemd/system/nfs-server.service; disabled; vendor preset: disabled)
   Active: inactive (dead)
Redirecting to /bin/systemctl start  nfs-server.service
==> default: Mounting NFS shared folders...

@jordisala1991
Copy link
Owner

jordisala1991 commented May 27, 2016

Normally it asks me for sudo password at that point.

Oh, sorry didn't saw it asked you too... it's too late xD

@jordisala1991 jordisala1991 reopened this May 27, 2016
@greg0ire
Copy link
Contributor Author

It did to me too, for /etc/exports, maybe I need to install something related to nfs?

@jordisala1991
Copy link
Owner

https://developer.fedoraproject.org/tools/vagrant/vagrant-nfs.html

Maybe this helps?

@greg0ire
Copy link
Contributor Author

greg0ire commented May 27, 2016

It goes a bit further…

The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

mount -o 'actimeo=1' 192.168.121.1:'/home/greg/dev/ArchetypeSonata' /vagrant

Stdout from the command:



Stderr from the command:

stdin: is not a tty
mount.nfs: access denied by server while mounting 192.168.121.1:/home/greg/dev/ArchetypeSonata

@greg0ire
Copy link
Contributor Author

Related : hashicorp/vagrant#5424

@jordisala1991
Copy link
Owner

Ugh, so many problems..

@greg0ire
Copy link
Contributor Author

greg0ire commented May 27, 2016

Yeah, I think I'm gonna wait for your docker WIP :P , it might be more simple (no nfs involved), plus I'm more familiar with that.

@jordisala1991
Copy link
Owner

I'm still learning docker, so it might take a while :P

@jordisala1991
Copy link
Owner

Added docker config... it took a while...

Could you tell me what you think about my docker config @greg0ire?

@greg0ire
Copy link
Contributor Author

I must go now, but I'll make sure to have a look at it!

@greg0ire
Copy link
Contributor Author

Not sure how I'm supposed to run this… tried docker-compose up since docker-sync isn't meant for linux, and here is the message I get :

Creating network "docker_default" with the default driver
ERROR: Volume sonata-sync declared as external, but could not be found. Please create the volume manually using docker volume create --name=sonata-sync and try again.

I think there should be a native version of this volume, and I know you can define several docker-compose file, so maybe have one OSX specific, and one linux specific? Or have the OSX one override the linux one (which would be the default one)?

@jordisala1991
Copy link
Owner

That's what I thought.. I am trying to override the volume, it's the only important part I need to change for osx.

@jordisala1991
Copy link
Owner

Done, you can execute:

docker-compose build
docker-compose -f docker-compose.yml -f docker-compose-linux.yml up

or start.sh

@greg0ire
Copy link
Contributor Author

I get to the app! After running composer install from the host, I have permissions problem for writing the cache. I can start over and run it from the guest, but what unix user am I supposed to login as?

Failed to write cache file "/var/www/html/app/cache/dev/classes.php".

@jordisala1991
Copy link
Owner

jordisala1991 commented Dec 11, 2016

you should use the configure.sh script. Had the same problem and didn't know how to solve it but chown www-data:www-data does the trick (I am sure there is a better way to do it, but don't know how).

@greg0ire
Copy link
Contributor Author

greg0ire commented Dec 11, 2016

It works!!! Good job! This will be invaluable to test PRs!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants