how to import vagrant without going through 'vagrant add box' - vagrant

I have the vagrant 'virtualbox' virtual machine, however I can no longer access vagrant with another pc to retrieve my information contained in the virtual machine.
'ubuntu/focus'
how can I proceed?

In your project directory (the one where you have the Vagrantfile) vagrant will create . .vagrant folder. The content of this folder has the Virtalbox vm information
for example:
ls -all .vagrant/machines/default/virtualbox/
total 72
drwxr-xr-x 11 fhenri staff 352 Aug 28 22:20 .
drwxr-xr-x 3 fhenri staff 96 Aug 27 22:38 ..
-rw-r--r-- 1 fhenri staff 40 Aug 28 22:20 action_provision
-rw-r--r-- 1 fhenri staff 10 Aug 28 22:18 action_set_name
-rw-r--r-- 1 fhenri staff 148 Sep 6 09:42 box_meta
-rw-r--r-- 1 fhenri staff 3 Aug 28 22:18 creator_uid
-rw-r--r-- 1 fhenri staff 36 Aug 28 22:18 id
-rw-r--r-- 1 fhenri staff 32 Aug 28 22:18 index_uuid
-rw------- 1 fhenri staff 1679 Aug 28 22:18 private_key
-rw-r--r-- 1 fhenri staff 316 Sep 6 10:18 synced_folders
-rw-r--r-- 1 fhenri staff 63 Aug 28 22:18 vagrant_cwd
the name of the vagrant machine is default and provider is virtual box in this case.
If you copy the virtual box VM into another PC, you also need to copy this folder or need to recreate it. It contains the id of virtual box VM which helps vagrant to map and link with the VM.

Related

BPF SDK path does not exist

I'm following the Anchor docs here, but I keep getting this error...
BPF SDK path does not exist: /Users/herbie/.cargo/bin/sdk/bpf: No such file or directory (os error 2)
I ran ls -al /Users/herbie/.cargo/bin and got this output:
total 239152
drwxr-xr-x 17 herbie staff 544 31 Jan 16:55 .
drwxr-xr-x 9 herbie staff 288 13 Dec 11:58 ..
-rwxr-xr-x 1 herbie staff 12574724 31 Jan 16:49 anchor
-rwxr-xr-x 12 herbie staff 8521112 31 Jan 16:55 cargo
-rwxr-xr-x 1 herbie staff 7578989 14 Dec 14:05 cargo-build-bpf
-rwxr-xr-x 12 herbie staff 8521112 31 Jan 16:55 cargo-clippy
-rwxr-xr-x 12 herbie staff 8521112 31 Jan 16:55 cargo-fmt
-rwxr-xr-x 12 herbie staff 8521112 31 Jan 16:55 cargo-miri
-rwxr-xr-x 12 herbie staff 8521112 31 Jan 16:55 clippy-driver
-rwxr-xr-x 12 herbie staff 8521112 31 Jan 16:55 rls
-rwxr-xr-x 12 herbie staff 8521112 31 Jan 16:55 rust-gdb
-rwxr-xr-x 12 herbie staff 8521112 31 Jan 16:55 rust-lldb
-rwxr-xr-x 12 herbie staff 8521112 31 Jan 16:55 rustc
-rwxr-xr-x 12 herbie staff 8521112 31 Jan 16:55 rustdoc
-rwxr-xr-x 12 herbie staff 8521112 31 Jan 16:55 rustfmt
-rwxr-xr-x 12 herbie staff 8521112 31 Jan 16:55 rustup
Haven't found much online, and have never heard of BPF before...
It's unclear when you're getting the error during the installation, but here's a few things to try:
be sure that you're using an up-to-date version of Rust stable with rustup update stable
check that you're using the Solana CLI version designated in the docs using solana -V
run cargo build-bpf on the hello world Rust application: https://github.com/solana-labs/example-helloworld/tree/master/src/program-rust
For more reference, BPF is the bytecode format used by on-chain programs with Solana. You can find some more info at the links contained within https://docs.solana.com/developing/on-chain-programs/overview#berkeley-packet-filter-bpf
Try removing the solana cache before running your code. It worked for me. Basically, the BPF SDK hasn't been installed accurately.
rm -rf ~/.cache/solana/*
After deleting the solana cache run. It should download the BPF SDK again
solana build

"/etc/sudoers is world writable” on Mac OS Mojave

I have gone through a lot of google results. Let me explain what I have tried first. I am currently working on a corporate laptop. Mac OS Mojave 10.14.6.
Error that I get:
sudo: /etc/sudoers is world writable
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin
ls -le /etc
-rwxrwxrwx 1 root wheel 179 Aug 18 2018 shells
drwxrwxrwx 4 root wheel 128 Aug 18 2018 snmp
drwxrwxrwx 5 root wheel 160 Nov 11 2019 ssh
drwxrwxrwx 6 root wheel 192 Nov 11 2019 ssl
-rwxrwxrwx 1 root wheel 257 Aug 18 2018 sudo_lecture
-rwxrwxrwx 1 root wheel 1630 Mar 11 11:51 sudoers
drwxrwxrwx 2 root wheel 64 Aug 18 2018 sudoers.d
drwxrwxrwx 4 root admin 128 Dec 25 2018 symantec
-rw-rw-rw-# 1 01244861 wheel 47 Feb 2 18:13 sysctl.conf
-rwxrwxrwx 1 root wheel 96 Aug 21 2018 syslog.conf
-rwxrwxrwx 1 root wheel 1316 Aug 18 2018 ttys
drwxrwxrwx 6 root wheel 192 Aug 18 2018 wfs
-rwxrwxrwx 1 root wheel 0 Aug 18 2018 xtab
-rwxrwxrwx 1 root wheel 126 Aug 18 2018 zprofile
-rwxrwxrwx 1 root wheel 207 Aug 18 2018 zshrc
I have changed permission using chmod 440 /etc/sudoers and chmod 777 /etc/sudoers and also using info and manually updating from the file properties.
I am using iTerm2 as my terminal.
echo $PATH
/Users/01244861/.yarn/bin:/Users/01244861/.nvm/versions/node/v10.13.0/bin:/usr/local/opt/node#10/bin:/usr/local/opt/node#10/bin:/usr/local/opt/node#10/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin:/usr/local/go/bin
echo $SHELL
/bin/zsh
My user permissions:
Is there anything else that I can do to fix this?
Thanks

Why mutiple local jar under a same maven groupId, artifactId and version?

I'm modifying the version of a jar config from 1.0.28 to 1.0.29-SNAPSHOT in my pom.xml for updating it. But I've found two jars in my local repository folder. Specially, the central repository is maintained by my company.
The maven version I've used is 2.2.1, and the version of jdk is 1.8.0_151
<dependency>
<groupId>com.my.company</groupId>
<artifactId>common</artifactId>
<version>1.0.29-SNAPSHOT</version>
</dependency>
I only need common-1.0.29-SNAPSHOT.jar. But I don't know why there is common-1.0.29-20181228.142316-1.jar here.
This is the file list on my computer:
-rw-r--r-- 1 staff staff 255 Dec 29 10:04 _remoterepositories
-rw-r--r-- 1 staff staff 371 Jan 2 09:53 maven-metadata-centralxml
-rw-r--r-- 1 staff staff 41 Jan 2 09:53 maven-metadata-centralxmlsha1
-rw-r--r-- 1 staff staff 1002 Jan 2 09:51 maven-metadata-mirror-allxml
-rw-r--r-- 1 staff staff 41 Jan 2 09:51 maven-metadata-mirror-allxmlsha1
-rw-r--r-- 1 staff staff 191 Jan 2 09:51 resolver-statusproperties
-rw-r--r-- 1 staff staff 48058 Dec 29 10:04 common-1029-20181228142316-1jar
-rw-r--r-- 1 staff staff 40 Dec 29 10:04 common-1029-20181228142316-1jarsha1
-rw-r--r-- 1 staff staff 7801 Dec 29 10:04 common-1029-20181228142316-1pom
-rw-r--r-- 1 staff staff 40 Dec 29 10:04 common-1029-20181228142316-1pomsha1
-rw-r--r-- 1 staff staff 48058 Dec 29 10:04 common-1029-SNAPSHOTjar
-rw-r--r-- 1 staff staff 7801 Dec 29 10:04 common-1029-SNAPSHOTpom
This is how Maven keeps track of what -SNAPSHOT actually means in the local repository. It is the timestamp for (if I recall correctly) when the artifact was installed.
A guess could be that a copy is kept in case an install process does not succeed for rollback.

Location of virtual machines in mac for virtual box

What is the location of all .vbox files that are created in virtual box in a mac. And how can we delete it?
I mistakenly deleted virtualbox.app file from Applications and now I want to delete all the remains of all virtual box files.
I tried following things:
drwxr-xr-x# 3 user admin 102 Dec 19 19:57 vagrant
-rw-r--r-- 1 root wheel 1824496 Feb 21 17:17 com.vagrant.vagrant.bom
-rw-r--r-- 1 root wheel 240 Feb 21 17:17 com.vagrant.vagrant.plist
drwx------ 5 root wheel 170 Feb 21 16:59 ubuntu-cloudimg-precise-vagrant-amd64_1487725164672_27815
./private/var/root/VirtualBox VMs/ubuntu-cloudimg-precise-vagrant-amd64_1487725164672_27815:
-rw------- 1 root wheel 3036 Feb 21 16:59 ubuntu-cloudimg-precise-vagrant-amd64_1487725164672_27815.vbox
-rw------- 1 root wheel 3036 Feb 21 16:59 ubuntu-cloudimg-precise-vagrant-amd64_1487725164672_27815.vbox-prev
lrwxr-xr-x 1 root wheel 24 Feb 21 17:17 vagrant -> /opt/vagrant/bin/vagrant
But I could not find the location of .vbox files to manually delete them.
By default the .vbox files normally go into your users' home directory:
pwd
/Users/Astro58/VirtualBox VMs
total 264
drwx------# 6 lance staff 204 Feb 22 19:03 ./
drwxr-xr-x+ 88 lance staff 2992 Feb 22 16:11 ../
drwx------ 6 lance staff 204 Feb 22 19:50 Laravel_default_1487808229046_76286/
drwx------ 7 lance staff 238 Feb 20 12:53 legacy_default_1487457532080_39585/
You should be able to delete the "VirtualBox VMs" directory via the rm command or via the Mac Finder.

Difference access between the server and my computer mac

I retrieve a project in symfony 1.4 . The project is currently running on an Ubuntu server (LAMP). When I run the project on my Mac , the photos do not appear yet the path is good . I think it is a problem of access rule but i am not an expert.
I Thank You in advance to help me.
As attachment files of my mac and the server.
On my mac :
-rwxrwxrwx 1 vincentmoulene _www 204 17 fév 22:43 README.md
drwxrwxrwx 17 vincentmoulene _www 578 14 jan 22:51 apps
drwxrwxrwx 5 vincentmoulene _www 170 4 mar 22:26 cache
drwxrwxrwx 8 vincentmoulene _www 272 26 fév 11:17 config
-rw-r--r-- 1 vincentmoulene _www 4478 3 mar 17:08 connection_sequel.spf
drwxrwxrwx 5 vincentmoulene _www 170 4 mar 22:26 data
-rwxrwxrwx 1 vincentmoulene _www 3263056 6 fév 12:20 emoovio_2015-02-06.sql
-rwxrwxrwx 1 vincentmoulene _www 3325677 16 fév 18:08 emoovio_2015-02-16.sql
-rwxrwxrwx 1 vincentmoulene _www 11510 14 jan 20:44 index.html
drwxrwxrwx 8 vincentmoulene _www 272 6 fév 16:58 lib
drwxrwxrwx 57 vincentmoulene _www 1938 26 fév 16:02 log
-rw-r--r-- 1 vincentmoulene _www 1364 2 mar 12:19 main.cf
drwxrwxrwx 4 vincentmoulene _www 136 14 jan 21:15 nbproject
drwxrwxrwx 4 vincentmoulene _www 136 14 jan 22:49 plugins
drwxrwxrwx 6 vincentmoulene _www 204 6 fév 16:58 sfFormExtraPlugin
-rwxrwxrwx 1 vincentmoulene _www 446 14 jan 20:44 symfony
drwxrwxrwx 6 vincentmoulene _www 204 6 fév 16:58 test
drwxrwxrwx 17 vincentmoulene _www 578 2 mar 15:29 web
On the server :
drwxrwxrwx 12 777 root 4096 Feb 26 10:08 ./
drwxr-xr-x 3 root root 4096 Dec 17 13:17 ../
drwxrwxrwx 14 www-data www-data 4096 Feb 3 2014 apps/
drwxrwxrwx 4 777 www-data 4096 Feb 25 14:55 cache/
drwxrwxrwx 3 www-data www-data 4096 Dec 29 10:35 config/
drwxrwxrwx 4 www-data www-data 4096 Dec 29 10:35 data/
-rwxrwxrwx 1 root root 11510 Dec 17 13:17 index.html*
drwxrwxrwx 7 www-data www-data 4096 Feb 3 2014 lib/
drwxrwxrwx 3 www-data www-data 4096 Feb 25 15:19 log/
drwxrwxrwx 2 www-data www-data 4096 Feb 2 2014 nbproject/
drwxrwxrwx 3 www-data www-data 4096 Feb 3 2014 plugins/
-rwxrwxrwx 1 www-data www-data 446 Feb 20 2013 symfony*
drwxrwxrwx 5 www-data www-data 4096 Feb 3 2014 test/
drwxrwxrwx 8 www-data www-data 4096 Aug 28 2014 web/
First, I got a functional site to improve it. This site is currently in production and runs on a LAMP stack (Ubuntu 14.04 , ....) .
To work on it , I recover the project . I work on Mac ( MAMP ) .
Indeed, the concern I have is that some pages are not available ... Therefore, I tried to change the rights but to no avail .
Then I tried to run two possibilities:
1) using Apache / Mysql run as www (Apache) and mysql ( mysql) : You do not -have permission to access this server /.../on (error 403).
2) using Apache / Mysql run as user (Apache) and user ( mysql) : The requested URL was not found /.../ on this server (error 404).
And in my apache_error.log : Directory index forbidden by Options directive:

Resources