Can't install libgl1-mesa-dri 32bit - apt

When I run the command sudo apt install libgl1-mesa-dri I get this:
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libgl1-mesa-dri:i386 : Depends: libc6:i386 (>= 2.27) but it is not going to be installed
Depends: libdrm-amdgpu1:i386 (>= 2.4.99+git1907300630.6652cf~oibaf~b) but it is not going to be installed
Depends: libdrm-intel1:i386 (>= 2.4.38) but it is not going to be installed
Depends: libdrm-nouveau2:i386 (>= 2.4.66) but it is not going to be installed
Depends: libdrm-radeon1:i386 (>= 2.4.31) but it is not going to be installed
Depends: libdrm2:i386 (>= 2.4.75) but it is not going to be installed
Depends: libelf1:i386 (>= 0.142) but it is not going to be installed
Depends: libexpat1:i386 (>= 2.0.1) but it is not going to be installed
Depends: libgcc1:i386 (>= 1:4.2) but it is not going to be installed
Depends: libglapi-mesa:i386 but it is not going to be installed
Depends: libllvm8:i386 (>= 1:8~svn298832-1~) but it is not going to be installed
Depends: libsensors4:i386 (>= 1:3.0.0) but it is not going to be installed
Depends: libstdc++6:i386 (>= 5.2) but it is not going to be installed
Depends: zlib1g:i386 (>= 1:1.1.4) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
And sudo aptitude install libgl1-mesa-dri:i386 did this...
gcc-4.7-base:i386{a} libbsd0:i386{ab} libc6:i386{ab} libdrm-amdgpu1:i386{ab} libdrm-intel1:i386{a} libdrm-nouveau2:i386{ab}
libdrm-radeon1:i386{ab} libdrm2:i386{ab} libedit2:i386{ab} libelf1:i386{ab} libexpat1:i386{ab} libffi6:i386{ab}
libgcc1:i386{ab} libgl1-mesa-dri:i386{b} libglapi-mesa:i386{ab} libllvm8:i386{ab} libpciaccess0:i386{ab}
libsensors4:i386{ab} libtinfo5:i386{ab} zlib1g:i386{ab}
0 packages upgraded, 20 newly installed, 0 to remove and 0 not upgraded.
Need to get 27.0 MB of archives. After unpacking 283 MB will be used.
The following packages have unmet dependencies:
libdrm-nouveau2 : Breaks: libdrm-nouveau2:i386 (!= 2.4.97-1ubuntu1~18.04.1) but 2.4.99+git1907300630.6652cf~oibaf~b is to be installed
libdrm-nouveau2:i386 : Breaks: libdrm-nouveau2 (!= 2.4.99+git1907300630.6652cf~oibaf~b) but 2.4.97-1ubuntu1~18.04.1 is installed
libllvm8:i386 : Depends: libatomic1:i386 (>= 4.8) which is a virtual package and is not provided by any available package
Depends: libstdc++6:i386 (>= 6) but it is not going to be installed
Depends: libtinfo5:i386 (>= 6) but 5.9-10ubuntu4 is to be installed
Breaks: libllvm8 (!= 1:8.0.1~+rc3-1ubuntu1~oibaf~b) but 1:8-3~ubuntu18.04.1 is installed
libllvm8 : Breaks: libllvm8:i386 (!= 1:8-3~ubuntu18.04.1) but 1:8.0.1~+rc3-1ubuntu1~oibaf~b is to be installed
libpciaccess0 : Breaks: libpciaccess0:i386 (!= 0.14-1) but 0.13.1-2 is to be installed
libpciaccess0:i386 : Breaks: libpciaccess0 (!= 0.13.1-2) but 0.14-1 is installed
libglapi-mesa : Breaks: libglapi-mesa:i386 (!= 19.0.2-1ubuntu1.1~18.04.2) but 19.2~git1908020730.54fbc6~oibaf~b is to be installed
libglapi-mesa:i386 : Breaks: libglapi-mesa (!= 19.2~git1908020730.54fbc6~oibaf~b) but 19.0.2-1ubuntu1.1~18.04.2 is installed
libelf1 : Breaks: libelf1:i386 (!= 0.170-0.4ubuntu0.1) but 0.153-2ubuntu1 is to be installed
libelf1:i386 : Breaks: libelf1 (!= 0.153-2ubuntu1) but 0.170-0.4ubuntu0.1 is installed
libbsd0 : Breaks: libbsd0:i386 (!= 0.8.7-1) but 0.4.2-1ubuntu1 is to be installed
libbsd0:i386 : Breaks: libbsd0 (!= 0.4.2-1ubuntu1) but 0.8.7-1 is installed
zlib1g : Breaks: zlib1g:i386 (!= 1:1.2.11.dfsg-0ubuntu2) but 1:1.2.7.dfsg-13ubuntu2 is to be installed
zlib1g:i386 : Breaks: zlib1g (!= 1:1.2.7.dfsg-13ubuntu2) but 1:1.2.11.dfsg-0ubuntu2 is installed
libc6 : Breaks: libc6:i386 (!= 2.27-3ubuntu1) but 2.17-0ubuntu5 is to be installed
libc6:i386 : Breaks: libc6 (!= 2.17-0ubuntu5) but 2.27-3ubuntu1 is installed
libexpat1 : Breaks: libexpat1:i386 (!= 2.2.5-3ubuntu0.1) but 2.1.0-2 is to be installed
libexpat1:i386 : Breaks: libexpat1 (!= 2.1.0-2) but 2.2.5-3ubuntu0.1 is installed
libgcc1 : Breaks: libgcc1:i386 (!= 1:8.3.0-6ubuntu1~18.04.1) but 1:4.7.3-1ubuntu1 is to be installed
libgcc1:i386 : Breaks: libgcc1 (!= 1:4.7.3-1ubuntu1) but 1:8.3.0-6ubuntu1~18.04.1 is installed
libdrm-amdgpu1:i386 : Breaks: libdrm-amdgpu1 (!= 2.4.99+git1907300630.6652cf~oibaf~b) but 2.4.97-1ubuntu1~18.04.1 is installed
libdrm-amdgpu1 : Breaks: libdrm-amdgpu1:i386 (!= 2.4.97-1ubuntu1~18.04.1) but 2.4.99+git1907300630.6652cf~oibaf~b is to be installed
libtinfo5 : Breaks: libtinfo5:i386 (!= 6.1-1ubuntu1.18.04) but 5.9-10ubuntu4 is to be installed
libtinfo5:i386 : Breaks: libtinfo5 (!= 5.9-10ubuntu4) but 6.1-1ubuntu1.18.04 is installed
libdrm2 : Breaks: libdrm2:i386 (!= 2.4.97-1ubuntu1~18.04.1) but 2.4.99+git1907300630.6652cf~oibaf~b is to be installed
libdrm2:i386 : Breaks: libdrm2 (!= 2.4.99+git1907300630.6652cf~oibaf~b) but 2.4.97-1ubuntu1~18.04.1 is installed
libgl1-mesa-dri : Breaks: libgl1-mesa-dri:i386 (!= 19.0.2-1ubuntu1.1~18.04.2) but 19.2~git1908020730.54fbc6~oibaf~b is to be installed
libgl1-mesa-dri:i386 : Depends: libc6:i386 (>= 2.27) but 2.17-0ubuntu5 is to be installed
Depends: libstdc++6:i386 (>= 5.2) but it is not going to be installed
Breaks: libgl1-mesa-dri (!= 19.2~git1908020730.54fbc6~oibaf~b) but 19.0.2-1ubuntu1.1~18.04.2 is installed
libedit2 : Breaks: libedit2:i386 (!= 3.1-20170329-1) but 2.11-20080614-5ubuntu1 is to be installed
libedit2:i386 : Breaks: libedit2 (!= 2.11-20080614-5ubuntu1) but 3.1-20170329-1 is installed
libffi6 : Breaks: libffi6:i386 (!= 3.2.1-8) but 3.0.13-2ubuntu1 is to be installed
libffi6:i386 : Breaks: libffi6 (!= 3.0.13-2ubuntu1) but 3.2.1-8 is installed
libdrm-radeon1 : Breaks: libdrm-radeon1:i386 (!= 2.4.97-1ubuntu1~18.04.1) but 2.4.99+git1907300630.6652cf~oibaf~b is to be installed
libdrm-radeon1:i386 : Breaks: libdrm-radeon1 (!= 2.4.99+git1907300630.6652cf~oibaf~b) but 2.4.97-1ubuntu1~18.04.1 is installed
libsensors4 : Breaks: libsensors4:i386 (!= 1:3.4.0-4) but 1:3.3.2-2ubuntu1 is to be installed
libsensors4:i386 : Breaks: libsensors4 (!= 1:3.3.2-2ubuntu1) but 1:3.4.0-4 is installed```

Ok, so I made a clean new installation, did dpkg add-architecture i386 and when I run apt update I get this:
Hit:1 http://repo.steampowered.com/steam precise InRelease
Hit:2 http://ports.ubuntu.com/ubuntu-ports bionic InRelease
Get:3 http://ports.ubuntu.com/ubuntu-ports bionic-security InRelease
[88.7 kB]
Get:4 http://ports.ubuntu.com/ubuntu-ports bionic-updates InRelease
[88.7 kB]
Get:5 http://ports.ubuntu.com/ubuntu-ports bionic-backports InRelease
[74.6 kB]
Ign:6 http://ports.ubuntu.com/ubuntu-ports bionic/main i386 Packages
Ign:7 http://ports.ubuntu.com/ubuntu-ports bionic/multiverse i386
Packages
Ign:8 http://ports.ubuntu.com/ubuntu-ports bionic/universe i386
Packages
Ign:9 http://ports.ubuntu.com/ubuntu-ports bionic/restricted i386
Packages
Ign:6 http://ports.ubuntu.com/ubuntu-ports bionic/main i386 Packages
Ign:7 http://ports.ubuntu.com/ubuntu-ports bionic/multiverse i386
Packages
Ign:8 http://ports.ubuntu.com/ubuntu-ports bionic/universe i386
Packages
Ign:9 http://ports.ubuntu.com/ubuntu-ports bionic/restricted i386
Packages
Ign:6 http://ports.ubuntu.com/ubuntu-ports bionic/main i386 Packages
Ign:7 http://ports.ubuntu.com/ubuntu-ports bionic/multiverse i386
Packages
Ign:8 http://ports.ubuntu.com/ubuntu-ports bionic/universe i386
Packages
Ign:9 http://ports.ubuntu.com/ubuntu-ports bionic/restricted i386 Packages
Err:6 http://ports.ubuntu.com/ubuntu-ports bionic/main i386 Packages
404 Not Found [IP: 91.189.88.150 80]
Ign:7 http://ports.ubuntu.com/ubuntu-ports bionic/multiverse i386 Packages
Ign:8 http://ports.ubuntu.com/ubuntu-ports bionic/universe i386 Packages
Ign:9 http://ports.ubuntu.com/ubuntu-ports bionic/restricted i386 Packages
Ign:10 http://ports.ubuntu.com/ubuntu-ports bionic-security/main i386 Packages
Ign:11 http://ports.ubuntu.com/ubuntu-ports bionic-security/universe i386 Packages
Ign:12 http://ports.ubuntu.com/ubuntu-ports bionic-security/multiverse i386 Packages
Ign:13 http://ports.ubuntu.com/ubuntu-ports bionic-security/restricted i386 Packages
Ign:10 http://ports.ubuntu.com/ubuntu-ports bionic-security/main i386 Packages
Ign:11 http://ports.ubuntu.com/ubuntu-ports bionic-security/universe i386 Packages
Ign:12 http://ports.ubuntu.com/ubuntu-ports bionic-security/multiverse i386 Packages
Ign:13 http://ports.ubuntu.com/ubuntu-ports bionic-security/restricted i386 Packages
Ign:10 http://ports.ubuntu.com/ubuntu-ports bionic-security/main i386 Packages
Ign:11 http://ports.ubuntu.com/ubuntu-ports bionic-security/universe i386 Packages
Ign:12 http://ports.ubuntu.com/ubuntu-ports bionic-security/multiverse i386 Packages
Ign:13 http://ports.ubuntu.com/ubuntu-ports bionic-security/restricted i386 Packages
Err:10 http://ports.ubuntu.com/ubuntu-ports bionic-security/main i386 Packages
404 Not Found [IP: 91.189.88.150 80]
Ign:11 http://ports.ubuntu.com/ubuntu-ports bionic-security/universe i386 Packages
Ign:12 http://ports.ubuntu.com/ubuntu-ports bionic-security/multiverse i386 Packages
Ign:13 http://ports.ubuntu.com/ubuntu-ports bionic-security/restricted i386 Packages
Ign:14 http://ports.ubuntu.com/ubuntu-ports bionic-updates/multiverse i386 Packages
Get:15 http://ports.ubuntu.com/ubuntu-ports bionic-updates/main armhf Packages [674 kB]
Ign:16 http://ports.ubuntu.com/ubuntu-ports bionic-updates/restricted i386 Packages
Ign:17 http://ports.ubuntu.com/ubuntu-ports bionic-updates/universe i386 Packages
Ign:18 http://ports.ubuntu.com/ubuntu-ports bionic-updates/main i386 Packages
Ign:14 http://ports.ubuntu.com/ubuntu-ports bionic-updates/multiverse i386 Packages
Ign:16 http://ports.ubuntu.com/ubuntu-ports bionic-updates/restricted i386 Packages
Ign:17 http://ports.ubuntu.com/ubuntu-ports bionic-updates/universe i386 Packages
Ign:18 http://ports.ubuntu.com/ubuntu-ports bionic-updates/main i386 Packages
Ign:14 http://ports.ubuntu.com/ubuntu-ports bionic-updates/multiverse i386 Packages
Ign:16 http://ports.ubuntu.com/ubuntu-ports bionic-updates/restricted i386 Packages
Ign:17 http://ports.ubuntu.com/ubuntu-ports bionic-updates/universe i386 Packages
Ign:18 http://ports.ubuntu.com/ubuntu-ports bionic-updates/main i386 Packages
Err:14 http://ports.ubuntu.com/ubuntu-ports bionic-updates/multiverse i386 Packages
404 Not Found [IP: 91.189.88.150 80]
Ign:16 http://ports.ubuntu.com/ubuntu-ports bionic-updates/restricted i386 Packages
Ign:17 http://ports.ubuntu.com/ubuntu-ports bionic-updates/universe i386 Packages
Ign:18 http://ports.ubuntu.com/ubuntu-ports bionic-updates/main i386 Packages
Ign:19 http://ports.ubuntu.com/ubuntu-ports bionic-backports/main i386 Packages
Ign:20 http://ports.ubuntu.com/ubuntu-ports bionic-backports/universe i386 Packages
Ign:19 http://ports.ubuntu.com/ubuntu-ports bionic-backports/main i386 Packages
Ign:20 http://ports.ubuntu.com/ubuntu-ports bionic-backports/universe i386 Packages
Ign:19 http://ports.ubuntu.com/ubuntu-ports bionic-backports/main i386 Packages
Ign:20 http://ports.ubuntu.com/ubuntu-ports bionic-backports/universe i386 Packages
Err:19 http://ports.ubuntu.com/ubuntu-ports bionic-backports/main i386 Packages
404 Not Found [IP: 91.189.88.150 80]
Ign:20 http://ports.ubuntu.com/ubuntu-ports bionic-backports/universe i386 Packages
Fetched 252 kB in 15s (16.7 kB/s)
Reading package lists... Done
E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/bionic/main/binary-i386/Packages 404 Not Found [IP: 91.189.88.150 80]
E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/bionic-security/main/binary-i386/Packages 404 Not Found [IP: 91.189.88.150 80]
E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/bionic-updates/multiverse/binary-i386/Packages 404 Not Found [IP: 91.189.88.150 80]
E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/bionic-backports/main/binary-i386/Packages 404 Not Found [IP: 91.189.88.150 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.

Related

heroku-buildpack-apt; Unable to locate package

I am using the buildpack located at https://github.com/heroku/heroku-buildpack-apt.git to install required packages using the Aptfile. Everything worked fine for a while, but now every package gives an "Unable to locate package" error. This is with the exact same files on the exact same heroku stack. Did the buildpack for using Aptfile deprecate or is there a workaround?
Full build log:
-----> Using buildpacks:
1. https://github.com/heroku/heroku-buildpack-apt.git
2. heroku/python
3. https://github.com/heroku/heroku-buildpack-python.git
4. https://github.com/matt-bertoncello/python-pyodbc-buildpack.git
-----> Apt app detected
-----> Detected Aptfile or Stack changes, flushing cache
-----> Updating apt caches
Get:1 http://archive.ubuntu.com/ubuntu focal InRelease [265 kB]
Get:2 http://apt.postgresql.org/pub/repos/apt focal-pgdg InRelease [81.6 kB]
Get:3 http://archive.ubuntu.com/ubuntu focal-security InRelease [109 kB]
Get:4 http://archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Get:5 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages [1,275 kB]
Get:6 http://apt.postgresql.org/pub/repos/apt focal-pgdg/main amd64 Packages [311 kB]
Get:7 http://archive.ubuntu.com/ubuntu focal/universe amd64 Packages [11.3 MB]
Get:8 http://archive.ubuntu.com/ubuntu focal-security/main amd64 Packages [786 kB]
Get:9 http://archive.ubuntu.com/ubuntu focal-security/universe amd64 Packages [699 kB]
Get:10 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [1,203 kB]
Get:11 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages [965 kB]
Fetched 17.2 MB in 2s (7,544 kB/s)
Reading package lists...
-----> Fetching .debs for unixodbc
Reading package lists...
Building dependency tree...
E: Unable to locate package unixodbc
! Push rejected, failed to compile Apt app.
! Push failed```

Problems with the installation of VirtualBox on Ubuntu 20.04.1 LTS

just so you know I'm pretty new at Linux.
I just made the jump from Ubuntu 19.10 to Ubuntu 20.04.1 LTS because I thought there wouldn't be a problem with VirtualBox.
When the upgrade was finished I noticed VirtualBox was gone, I tried to install it following the instruction on the official website and other sites.
I don't know what you guys exactly need to help me solve the problem so here's some informations :
Here's what appears when I do sudo apt update :
Hit:1 http://archive.ubuntu.com/ubuntu focal InRelease
Get:2 http://archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Get:3 http://security.ubuntu.com/ubuntu focal-security InRelease [109 kB]
Hit:4 http://download.virtualbox.org/virtualbox/debian focal InRelease
Get:5 http://security.ubuntu.com/ubuntu focal-security/main i386 Packages [169 kB]
Get:6 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages [412 kB]
Get:7 http://security.ubuntu.com/ubuntu focal-security/main Translation-en [93,5 kB]
Get:8 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [724 kB]
Get:9 http://archive.ubuntu.com/ubuntu focal-updates/main i386 Packages [399 kB]
Get:10 http://archive.ubuntu.com/ubuntu focal-updates/main Translation-en [180 kB]
Get:11 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 c-n-f Metadata [11,4 kB]
Get:12 http://archive.ubuntu.com/ubuntu focal-updates/restricted i386 Packages [13,4 kB]
Get:13 http://archive.ubuntu.com/ubuntu focal-updates/restricted amd64 Packages [110 kB]
Get:14 http://archive.ubuntu.com/ubuntu focal-updates/restricted Translation-en [16,5 kB]
Fetched 2 352 kB in 1s (2 345 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
10 packages can be upgraded. Run 'apt list --upgradable' to see them.
Now sudo apt install virtualbox virtualbox-ext-pack :
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package virtualbox is a virtual package provided by:
virtualbox-6.1 6.1.16-140961~Ubuntu~eoan
virtualbox-6.0 6.0.24-139119~Ubuntu~eoan
You should explicitly select one to install.
Package virtualbox-ext-pack is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'virtualbox' has no installation candidate
E: Package 'virtualbox-ext-pack' has no installation candidate
Or when I do sudo apt install virtualbox-6.0 :
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
virtualbox-6.0 : Depends: libqt5printsupport5 (>= 5.0.2) but it is not installable
Depends: python (< 2.8) but it is not installable
Depends: python (>= 2.7) but it is not installable
Depends: python:any (>= 2.6.6-7~)
Recommends: libsdl-ttf2.0-0 but it is not installable
Recommends: gcc but it is not going to be installed
Recommends: make but it is not going to be installed or
build-essential but it is not going to be installed or
dpkg-dev but it is not going to be installed
Recommends: binutils but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
I did
$ wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -
$ wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add -
and
echo "deb [arch=amd64] http://download.virtualbox.org/virtualbox/debian $(lsb_release -cs) contrib" | \
sudo tee -a /etc/apt/sources.list.d/virtualbox.list
without any problems.
I hope everyone is having a good day :)
#Just Download a debian file:
https://download.virtualbox.org/virtualbox/6.1.16/virtualbox-6.1_6.1.16-140961~Ubuntu~eoan_amd64.deb
And install with :
sudo dpkg -i virtualbox-6.1_6.1.16-140961~Ubuntu~eoan_amd64.deb
#If get's Any error
sudo apt install -f
Just add a repository to your system to download the package virtualbox needs:
deb http://deb.debian.org/debian buster main contrib non-free
And then reinstall with the command:
sudo apt install virtualbox-6.1
It worked with me.
I solved it in the following way
sudo add-apt-repository universe
sudo add-apt-repository multiverse
sudo add-apt-repository "deb http://download.virtualbox.org/virtualbox/debian bionic contrib"
sudo apt-get update
If when doing apt-get update it appears:
N: Skipping acquire of configured file 'contrib/binary-i386/Packages'
as repository 'http://download.virtualbox.org/virtualbox/debian bionic
InRelease' doesn't support architecture 'i386'
then:
echo "deb [arch=amd64] http://download.virtualbox.org/virtualbox/debian $(lsb_release -sc) contrib" | sudo tee /etc/apt/sources.list
continue:
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get install libpng16-16 libqt5core5a libqt5printsupport5 libqt5widgets5 libqt5x11extras5
sudo apt-get install virtualbox-6.0 -y

Downgrading Elastic Search from 7 to 6?

I am trying to downgrade Elastic Search from 7 to 6 as the application I am using only works on 6.
When I install 6 I get boosted to 7 for some reason:
{
"name" : "activecollab-v6",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "D7qs_zqTTX6Rv8AiE_ioqw",
"version" : {
"number" : "7.1.0",
"build_flavor" : "default",
"build_type" : "deb",
"build_hash" : "606a173",
"build_date" : "2019-05-16T00:43:15.323135Z",
"build_snapshot" : false,
"lucene_version" : "8.0.0",
"minimum_wire_compatibility_version" : "6.8.0",
"minimum_index_compatibility_version" : "6.0.0-beta1"
},
"tagline" : "You Know, for Search"
}
How do I ensure I am downgraded? The following is my install recipe and below that is the recipe report which shows that elastic search is installed too.
# Install Elastic Search
echo ">> Installing Elastic GPG Key"
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
echo ">> Install apt-transport-https"
apt install apt-transport-https
echo ">> Adding deb package"
echo "deb https://artifacts.elastic.co/packages/6.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-6.x.list
echo ">> Updating apt"
apt update
echo ">> Installing Java and Elastic Search"
apt -y install default-jre elasticsearch
echo ">> Java Installed"
echo ">> Elastic Search Installed"
echo ">> Scheduling Elasticsearch"
/bin/systemctl daemon-reload
/bin/systemctl enable elasticsearch.service
echo ">> Starting Elasticsearch"
systemctl start elasticsearch.service
echo ">> Running on port 9200. Make sure to add a firewall rule if you need external access."
echo ">> You can check the status by running 'curl 'http://localhost:9200'. Note: may take a few seconds before elasticsearch is fully started."
Recipe Report
>> Installing Elastic GPG Key
Warning: apt-key output should not be parsed (stdout is not a terminal)
OK
>> Install apt-transport-https
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
Reading package lists...
Building dependency tree...
Reading state information...
apt-transport-https is already the newest version (1.6.10).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
>> Adding deb package
deb https://artifacts.elastic.co/packages/6.x/apt stable main
>> Updating apt
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
Get:1 http://ppa.launchpad.net/chris-lea/redis-server/ubuntu bionic InRelease [15.4 kB]
Get:2 http://mirrors.digitalocean.com/ubuntu bionic InRelease [242 kB]
Get:3 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Get:4 http://archive.ubuntu.com/ubuntu bionic InRelease [242 kB]
Get:5 http://ppa.launchpad.net/nginx/development/ubuntu bionic InRelease [15.4 kB]
Get:6 http://ppa.launchpad.net/ondrej/apache2/ubuntu bionic InRelease [20.7 kB]
Get:7 http://ppa.launchpad.net/ondrej/php/ubuntu bionic InRelease [20.8 kB]
Get:8 http://ppa.launchpad.net/webupd8team/java/ubuntu bionic InRelease [15.4 kB]
Get:9 https://deb.nodesource.com/node_10.x bionic InRelease [4584 B]
Hit:10 https://repos.sonar.digitalocean.com/apt main InRelease
Get:11 http://mirrors.digitalocean.com/ubuntu bionic-updates InRelease [88.7 kB]
Get:12 http://mirrors.digitalocean.com/ubuntu bionic-backports InRelease [74.6 kB]
Ign:13 https://artifacts.elastic.co/packages/6.x/apt stable InRelease
Get:14 http://ppa.launchpad.net/chris-lea/redis-server/ubuntu bionic/main amd64 Packages [1004 B]
Get:15 http://ppa.launchpad.net/chris-lea/redis-server/ubuntu bionic/main Translation-en [584 B]
Ign:16 https://artifacts.elastic.co/packages/7.x/apt stable InRelease
Get:17 https://artifacts.elastic.co/packages/6.x/apt stable Release [5116 B]
Get:18 https://artifacts.elastic.co/packages/7.x/apt stable Release [5116 B]
Get:19 https://artifacts.elastic.co/packages/6.x/apt stable Release.gpg [473 B]
Get:20 https://artifacts.elastic.co/packages/7.x/apt stable Release.gpg [473 B]
Get:21 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages [349 kB]
Get:22 http://security.ubuntu.com/ubuntu bionic-security/main Translation-en [125 kB]
Get:23 http://security.ubuntu.com/ubuntu bionic-security/restricted amd64 Packages [4296 B]
Get:24 http://security.ubuntu.com/ubuntu bionic-security/restricted Translation-en [2192 B]
Get:25 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 Packages [245 kB]
Get:26 http://security.ubuntu.com/ubuntu bionic-security/universe Translation-en [140 kB]
Get:27 http://security.ubuntu.com/ubuntu bionic-security/multiverse amd64 Packages [4004 B]
Get:28 http://security.ubuntu.com/ubuntu bionic-security/multiverse Translation-en [2060 B]
Get:29 http://archive.ubuntu.com/ubuntu bionic/universe amd64 Packages [8570 kB]
Get:30 http://archive.ubuntu.com/ubuntu bionic/universe Translation-en [4941 kB]
Get:31 http://ppa.launchpad.net/nginx/development/ubuntu bionic/main amd64 Packages [4264 B]
Get:32 http://ppa.launchpad.net/nginx/development/ubuntu bionic/main Translation-en [4328 B]
Get:33 http://ppa.launchpad.net/ondrej/apache2/ubuntu bionic/main amd64 Packages [8528 B]
Get:34 http://ppa.launchpad.net/ondrej/apache2/ubuntu bionic/main Translation-en [4052 B]
Get:35 http://ppa.launchpad.net/ondrej/php/ubuntu bionic/main amd64 Packages [45.1 kB]
Get:36 http://ppa.launchpad.net/ondrej/php/ubuntu bionic/main Translation-en [22.1 kB]
Get:37 http://mirrors.digitalocean.com/ubuntu bionic/main amd64 Packages [1019 kB]
Get:38 http://mirrors.digitalocean.com/ubuntu bionic/main Translation-en [516 kB]
Get:39 http://mirrors.digitalocean.com/ubuntu bionic/restricted amd64 Packages [9184 B]
Get:40 http://mirrors.digitalocean.com/ubuntu bionic/restricted Translation-en [3584 B]
Get:41 http://mirrors.digitalocean.com/ubuntu bionic/universe amd64 Packages [8570 kB]
Get:42 https://deb.nodesource.com/node_10.x bionic/main amd64 Packages [767 B]
Get:43 http://mirrors.digitalocean.com/ubuntu bionic/universe Translation-en [4941 kB]
Get:44 http://mirrors.digitalocean.com/ubuntu bionic/multiverse amd64 Packages [151 kB]
Get:45 http://mirrors.digitalocean.com/ubuntu bionic/multiverse Translation-en [108 kB]
Get:46 http://mirrors.digitalocean.com/ubuntu bionic-updates/main amd64 Packages [618 kB]
Get:47 http://mirrors.digitalocean.com/ubuntu bionic-updates/main Translation-en [229 kB]
Get:48 http://mirrors.digitalocean.com/ubuntu bionic-updates/restricted amd64 Packages [6996 B]
Get:49 http://mirrors.digitalocean.com/ubuntu bionic-updates/restricted Translation-en [3076 B]
Get:50 http://mirrors.digitalocean.com/ubuntu bionic-updates/universe amd64 Packages [937 kB]
Get:51 http://mirrors.digitalocean.com/ubuntu bionic-updates/universe Translation-en [274 kB]
Get:52 http://mirrors.digitalocean.com/ubuntu bionic-updates/multiverse amd64 Packages [6644 B]
Get:53 http://mirrors.digitalocean.com/ubuntu bionic-updates/multiverse Translation-en [3556 B]
Get:54 http://mirrors.digitalocean.com/ubuntu bionic-backports/main amd64 Packages [1024 B]
Get:55 http://mirrors.digitalocean.com/ubuntu bionic-backports/main Translation-en [448 B]
Get:56 http://mirrors.digitalocean.com/ubuntu bionic-backports/universe amd64 Packages [3496 B]
Get:57 http://mirrors.digitalocean.com/ubuntu bionic-backports/universe Translation-en [1604 B]
Get:58 https://artifacts.elastic.co/packages/6.x/apt stable/main amd64 Packages [49.1 kB]
Get:59 https://artifacts.elastic.co/packages/7.x/apt stable/main amd64 Packages [6534 B]
Fetched 32.8 MB in 8s (4196 kB/s)
Reading package lists...
Building dependency tree...
Reading state information...
7 packages can be upgraded. Run 'apt list --upgradable' to see them.
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list.d/elastic-6.x.list:1 and /etc/apt/sources.list.d/elastic-6.x.list:2
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list.d/elastic-6.x.list:1 and /etc/apt/sources.list.d/elastic-6.x.list:2
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list.d/elastic-6.x.list:1 and /etc/apt/sources.list.d/elastic-6.x.list:2
W: Target CNF (main/cnf/Commands-amd64) is configured multiple times in /etc/apt/sources.list.d/elastic-6.x.list:1 and /etc/apt/sources.list.d/elastic-6.x.list:2
W: Target CNF (main/cnf/Commands-all) is configured multiple times in /etc/apt/sources.list.d/elastic-6.x.list:1 and /etc/apt/sources.list.d/elastic-6.x.list:2
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list.d/elastic-6.x.list:1 and /etc/apt/sources.list.d/elastic-6.x.list:3
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list.d/elastic-6.x.list:1 and /etc/apt/sources.list.d/elastic-6.x.list:3
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list.d/elastic-6.x.list:1 and /etc/apt/sources.list.d/elastic-6.x.list:3
W: Target CNF (main/cnf/Commands-amd64) is configured multiple times in /etc/apt/sources.list.d/elastic-6.x.list:1 and /etc/apt/sources.list.d/elastic-6.x.list:3
W: Target CNF (main/cnf/Commands-all) is configured multiple times in /etc/apt/sources.list.d/elastic-6.x.list:1 and /etc/apt/sources.list.d/elastic-6.x.list:3
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list.d/elastic-6.x.list:1 and /etc/apt/sources.list.d/elastic-6.x.list:4
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list.d/elastic-6.x.list:1 and /etc/apt/sources.list.d/elastic-6.x.list:4
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list.d/elastic-6.x.list:1 and /etc/apt/sources.list.d/elastic-6.x.list:4
W: Target CNF (main/cnf/Commands-amd64) is configured multiple times in /etc/apt/sources.list.d/elastic-6.x.list:1 and /etc/apt/sources.list.d/elastic-6.x.list:4
W: Target CNF (main/cnf/Commands-all) is configured multiple times in /etc/apt/sources.list.d/elastic-6.x.list:1 and /etc/apt/sources.list.d/elastic-6.x.list:4
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list.d/elastic-6.x.list:1 and /etc/apt/sources.list.d/elastic-6.x.list:2
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list.d/elastic-6.x.list:1 and /etc/apt/sources.list.d/elastic-6.x.list:2
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list.d/elastic-6.x.list:1 and /etc/apt/sources.list.d/elastic-6.x.list:2
W: Target CNF (main/cnf/Commands-amd64) is configured multiple times in /etc/apt/sources.list.d/elastic-6.x.list:1 and /etc/apt/sources.list.d/elastic-6.x.list:2
W: Target CNF (main/cnf/Commands-all) is configured multiple times in /etc/apt/sources.list.d/elastic-6.x.list:1 and /etc/apt/sources.list.d/elastic-6.x.list:2
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list.d/elastic-6.x.list:1 and /etc/apt/sources.list.d/elastic-6.x.list:3
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list.d/elastic-6.x.list:1 and /etc/apt/sources.list.d/elastic-6.x.list:3
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list.d/elastic-6.x.list:1 and /etc/apt/sources.list.d/elastic-6.x.list:3
W: Target CNF (main/cnf/Commands-amd64) is configured multiple times in /etc/apt/sources.list.d/elastic-6.x.list:1 and /etc/apt/sources.list.d/elastic-6.x.list:3
W: Target CNF (main/cnf/Commands-all) is configured multiple times in /etc/apt/sources.list.d/elastic-6.x.list:1 and /etc/apt/sources.list.d/elastic-6.x.list:3
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list.d/elastic-6.x.list:1 and /etc/apt/sources.list.d/elastic-6.x.list:4
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list.d/elastic-6.x.list:1 and /etc/apt/sources.list.d/elastic-6.x.list:4
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list.d/elastic-6.x.list:1 and /etc/apt/sources.list.d/elastic-6.x.list:4
W: Target CNF (main/cnf/Commands-amd64) is configured multiple times in /etc/apt/sources.list.d/elastic-6.x.list:1 and /etc/apt/sources.list.d/elastic-6.x.list:4
W: Target CNF (main/cnf/Commands-all) is configured multiple times in /etc/apt/sources.list.d/elastic-6.x.list:1 and /etc/apt/sources.list.d/elastic-6.x.list:4
>> Installing Java and Elastic Search
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
Reading package lists...
Building dependency tree...
Reading state information...
default-jre is already the newest version (2:1.11-68ubuntu1~18.04.1).
The following NEW packages will be installed:
elasticsearch
0 upgraded, 1 newly installed, 0 to remove and 7 not upgraded.
Need to get 347 MB of archives.
After this operation, 572 MB of additional disk space will be used.
Get:1 https://artifacts.elastic.co/packages/7.x/apt stable/main amd64 elasticsearch amd64 7.1.0 [347 MB]
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (This frontend requires a controlling tty.)
debconf: falling back to frontend: Teletype
dpkg-preconfigure: unable to re-open stdin:
Fetched 347 MB in 6s (57.1 MB/s)
Selecting previously unselected package elasticsearch.
(Reading database ...
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 91269 files and directories currently installed.)
Preparing to unpack .../elasticsearch_7.1.0_amd64.deb ...
Creating elasticsearch group... OK
Creating elasticsearch user... OK
Unpacking elasticsearch (7.1.0) ...
Processing triggers for ureadahead (0.100.0-21) ...
Setting up elasticsearch (7.1.0) ...
Created elasticsearch keystore in /etc/elasticsearch
Processing triggers for systemd (237-3ubuntu10.21) ...
Processing triggers for ureadahead (0.100.0-21) ...
>> Java Installed
>> Elastic Search Installed
>> Scheduling Elasticsearch
Synchronizing state of elasticsearch.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable elasticsearch
Created symlink /etc/systemd/system/multi-user.target.wants/elasticsearch.service → /usr/lib/systemd/system/elasticsearch.service.
>> Starting Elasticsearch
>> Running on port 9200. Make sure to add a firewall rule if you need external access.
>> You can check the status by running 'curl 'http://localhost:9200'. Note: may take a few seconds before elasticsearch is fully started.
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
There is no downgrade. Purge the install and start over.
The DEB repository looks correct. Have you always had it like that? Because this cannot get you version 7.x.
Update:
I can see the line Get:59 https://artifacts.elastic.co/packages/7.x/apt stable/main amd64 Packages [6534 B] in your output, so you have added both the 6.x and the 7.x repository. Remove the 7.x repo (/etc/apt/sources.list.d/elastic-7.x.list), purge, and install again.
Alternatively you could purge elasticsearch and specify the version to install: sudo apt-get install elasticsearch=6.8.0. I think this is the version number you could pick, but you can verify what is available with apt-cache policy elasticsearch.
I was in the same position to downgrade the elasticsearch from 7 to 6 without losing the data. The easy trick I did was, removed the existing elasticsearch, and installed a new one. It worked for me. I would like to give you steps to downgrade. I was using ubuntu server. Hence,
Stop the running server. sudo service elasticsearch stop
Remove the elasticsearch: sudo apt-get remove elasticsearch
Install the elasticsearch version 6.x
Installation reference link: Install elasticsearch in ubuntu
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
sudo apt-get install apt-transport-https
echo "deb https://artifacts.elastic.co/packages/6.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-6.x.list
sudo apt-get update && sudo apt-get install elasticsearch
Elasticsearch may start automatically. You can check the status: sudo service elasticsearch status. If it says failed then you can restart it with: sudo service elasticsearch restart or sudo systemctl restart elasticsearch. It should restart the elasticsearch server.
Done.
Warning!
I can't guarantee that the data will be there. Hence, make sure to backup your data before doing this step. Yes, it is true that I didn't lose my data.

Impossible to apt install on Ubuntu's bash windows 10 version

I installed Ubuntu's unix bash on Windows 10 (this : https://www.microsoft.com/fr-fr/p/ubuntu/9nblggh4msv6#activetab=pivot:overviewtab )
it installed well but I can't "apt install" (yes, on this version it's just "apt install")
After typing my pw I have this :
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
binutils binutils-common binutils-x86-64-linux-gnu cpp cpp-7 gcc-7 gcc-7-base libasan4 libatomic1 libbinutils
libc-dev-bin libc6-dev libcc1-0 libcilkrts5 libgcc-7-dev libgomp1 libisl19 libitm1 liblsan0 libmpc3 libmpx2
libquadmath0 libtsan0 libubsan0 linux-libc-dev manpages-dev
Suggested packages:
binutils-doc cpp-doc gcc-7-locales gcc-multilib make autoconf automake libtool flex bison gdb gcc-doc gcc-7-multilib
gcc-7-doc libgcc1-dbg libgomp1-dbg libitm1-dbg libatomic1-dbg libasan4-dbg liblsan0-dbg libtsan0-dbg libubsan0-dbg
libcilkrts5-dbg libmpx2-dbg libquadmath0-dbg glibc-doc
The following NEW packages will be installed:
binutils binutils-common binutils-x86-64-linux-gnu cpp cpp-7 gcc gcc-7 gcc-7-base libasan4 libatomic1 libbinutils
libc-dev-bin libc6-dev libcc1-0 libcilkrts5 libgcc-7-dev libgomp1 libisl19 libitm1 liblsan0 libmpc3 libmpx2
libquadmath0 libtsan0 libubsan0 linux-libc-dev manpages-dev
0 upgraded, 27 newly installed, 0 to remove and 0 not upgraded.
Need to get 26.9 MB of archives.
After this operation, 115 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Ign:1 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 binutils-common amd64 2.30-20ubuntu2~18.04
Ign:2 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libbinutils amd64 2.30-20ubuntu2~18.04
Err:1 http://security.ubuntu.com/ubuntu bionic-updates/main amd64 binutils-common amd64 2.30-20ubuntu2~18.04
Connection failed [IP: 91.189.88.152 80]
Ign:3 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 binutils-x86-64-linux-gnu amd64 2.30-20ubuntu2~18.04
Ign:4 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 binutils amd64 2.30-20ubuntu2~18.04
Err:2 http://security.ubuntu.com/ubuntu bionic-updates/main amd64 libbinutils amd64 2.30-20ubuntu2~18.04
Connection failed [IP: 91.189.91.23 80]
Err:5 http://archive.ubuntu.com/ubuntu bionic/main amd64 gcc-7-base amd64 7.3.0-16ubuntu3
Connection failed [IP: 91.189.88.161 80]
Err:6 http://archive.ubuntu.com/ubuntu bionic/main amd64 libisl19 amd64 0.19-1
Connection failed [IP: 91.189.88.152 80]
Err:3 http://security.ubuntu.com/ubuntu bionic-updates/main amd64 binutils-x86-64-linux-gnu amd64 2.30-20ubuntu2~18.04
Connection failed [IP: 91.189.88.149 80]
Err:4 http://security.ubuntu.com/ubuntu bionic-updates/main amd64 binutils amd64 2.30-20ubuntu2~18.04
Connection failed [IP: 91.189.88.162 80]
Err:7 http://archive.ubuntu.com/ubuntu bionic/main amd64 libmpc3 amd64 1.1.0-1
Connection failed [IP: 91.189.91.23 80]
Err:8 http://archive.ubuntu.com/ubuntu bionic/main amd64 cpp-7 amd64 7.3.0-16ubuntu3
Connection failed [IP: 91.189.88.149 80]
Err:9 http://archive.ubuntu.com/ubuntu bionic/main amd64 cpp amd64 4:7.3.0-3ubuntu2
Connection failed [IP: 91.189.88.162 80]
Err:10 http://archive.ubuntu.com/ubuntu bionic/main amd64 libcc1-0 amd64 8-20180414-1ubuntu2
Connection failed [IP: 91.189.88.161 80]
Err:11 http://archive.ubuntu.com/ubuntu bionic/main amd64 libgomp1 amd64 8-20180414-1ubuntu2
Connection failed [IP: 91.189.88.152 80]
Err:12 http://archive.ubuntu.com/ubuntu bionic/main amd64 libitm1 amd64 8-20180414-1ubuntu2
Connection failed [IP: 91.189.91.23 80]
(and then it continues until "Err:30")
then :
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
same when i try to update (and same for the fix missing option)
Do you have an idea of how to solve this ? I searched on google for hours without finding anything
tryed on different connections, with antivirus OFF etc, same.
thank you for your time !
I've seen this problem occur in the past with some computers that are using an IPv6 address. is your computer using one? Also There was a discussion a while back with this same error on another stackoverflow, I can't find the link to it now. In the end it was a corporate network issue blocking apt install. Check your firewall settings and also try to disable any third part anti virus/firewall you may be running. Refer to these links as well they should help.
https://github.com/Microsoft/WSL/issues/1720
https://www.reddit.com/r/bashonubuntuonwindows/comments/6h71ku/bash_aptget_wont_work/

apt-get install build-essential not working on vagrant through provision

I have the following in my Vagrantfile. It install vim, but it does not install nodejs, git etc. How to change it so that it run apt-get install build-essential git-core python-software-properties nodejs? Or should I do this with puppet file?
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu32"
config.vm.provision :shell, path: './provision.sh'
config.vm.network "public_network"
end
provision.sh
apt-get update
apt-get install build-essential git-core python-software-properties nodejs
apt-get install vim -y
====
UPDATE: This is the outputs of vagrant up.
vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
[default] Importing base box 'ubuntu32'...
[default] Matching MAC address for NAT networking...
[default] Setting the name of the VM...
[default] Clearing any previously set forwarded ports...
[default] Creating shared folders metadata...
[default] Clearing any previously set network interfaces...
[default] Available bridged network interfaces:
1) en1: Wi-Fi (AirPort)
2) en0: Ethernet
3) p2p0
What interface should the network bridge to? 1
[default] Preparing network interfaces based on configuration...
[default] Forwarding ports...
[default] -- 22 => 2222 (adapter 1)
[default] Booting VM...
[default] Waiting for machine to boot. This may take a few minutes...
[default] Machine booted and ready!
[default] The guest additions on this VM do not match the installed version of
VirtualBox! In most cases this is fine, but in rare cases it can
cause things such as shared folders to not work properly. If you see
shared folder errors, please update the guest additions within the
virtual machine and reload your VM.
Guest Additions Version: 4.2.0
VirtualBox Version: 4.3
[default] Configuring and enabling network interfaces...
[default] Mounting shared folders...
[default] -- /vagrant
[default] Running provisioner: shell...
[default] Running: /var/folders/y0/dzf6yf9n5r1bsl3p94lmv2fr0000gp/T/vagrant-shell20131108-47487-13ypot
stdin: is not a tty
Ign http://security.ubuntu.com precise-security InRelease
Get:1 http://security.ubuntu.com precise-security Release.gpg [198 B]
Get:2 http://security.ubuntu.com precise-security Release [49.6 kB]
Get:3 http://security.ubuntu.com precise-security/main Sources [92.5 kB]
Get:4 http://security.ubuntu.com precise-security/restricted Sources [2,494 B]
Get:5 http://security.ubuntu.com precise-security/universe Sources [29.6 kB]
Ign http://us.archive.ubuntu.com precise InRelease
Get:6 http://security.ubuntu.com precise-security/multiverse Sources [1,804 B]
Ign http://us.archive.ubuntu.com precise-updates InRelease
Ign http://us.archive.ubuntu.com precise-backports InRelease
Get:7 http://us.archive.ubuntu.com precise Release.gpg [198 B]
Get:8 http://us.archive.ubuntu.com precise-updates Release.gpg [198 B]
Get:9 http://us.archive.ubuntu.com precise-backports Release.gpg [198 B]
Get:10 http://security.ubuntu.com precise-security/main i386 Packages [354 kB]
Get:11 http://us.archive.ubuntu.com precise Release [49.6 kB]
Get:12 http://security.ubuntu.com precise-security/restricted i386 Packages [4,620 B]
Get:13 http://us.archive.ubuntu.com precise-updates Release [49.6 kB]
Get:14 http://security.ubuntu.com precise-security/universe i386 Packages [88.4 kB]
Get:15 http://security.ubuntu.com precise-security/multiverse i386 Packages [2,640 B]
Get:16 http://us.archive.ubuntu.com precise-backports Release [49.6 kB]
Get:17 http://security.ubuntu.com precise-security/main TranslationIndex [74 B]
Get:18 http://security.ubuntu.com precise-security/multiverse TranslationIndex [72 B]
Get:19 http://security.ubuntu.com precise-security/restricted TranslationIndex [72 B]
Get:20 http://security.ubuntu.com precise-security/universe TranslationIndex [73 B]
Get:21 http://us.archive.ubuntu.com precise/main Sources [934 kB]
Get:22 http://security.ubuntu.com precise-security/main Translation-en [159 kB]
Get:23 http://security.ubuntu.com precise-security/multiverse Translation-en [1,299 B]
Get:24 http://security.ubuntu.com precise-security/restricted Translation-en [1,253 B]
Get:25 http://security.ubuntu.com precise-security/universe Translation-en [53.8 kB]
Get:26 http://us.archive.ubuntu.com precise/restricted Sources [5,470 B]
Get:27 http://us.archive.ubuntu.com precise/universe Sources [5,019 kB]
Get:28 http://us.archive.ubuntu.com precise/multiverse Sources [155 kB]
Get:29 http://us.archive.ubuntu.com precise/main i386 Packages [1,274 kB]
Get:30 http://us.archive.ubuntu.com precise/restricted i386 Packages [8,431 B]
Get:31 http://us.archive.ubuntu.com precise/universe i386 Packages [4,796 kB]
Get:32 http://us.archive.ubuntu.com precise/multiverse i386 Packages [121 kB]
Get:33 http://us.archive.ubuntu.com precise/main TranslationIndex [3,706 B]
Get:34 http://us.archive.ubuntu.com precise/multiverse TranslationIndex [2,676 B]
Get:35 http://us.archive.ubuntu.com precise/restricted TranslationIndex [2,596 B]
Get:36 http://us.archive.ubuntu.com precise/universe TranslationIndex [2,922 B]
Get:37 http://us.archive.ubuntu.com precise-updates/main Sources [424 kB]
Get:38 http://us.archive.ubuntu.com precise-updates/restricted Sources [7,006 B]
Get:39 http://us.archive.ubuntu.com precise-updates/universe Sources [99.2 kB]
Get:40 http://us.archive.ubuntu.com precise-updates/multiverse Sources [8,354 B]
Get:41 http://us.archive.ubuntu.com precise-updates/main i386 Packages [723 kB]
Get:42 http://us.archive.ubuntu.com precise-updates/restricted i386 Packages [11.4 kB]
Get:43 http://us.archive.ubuntu.com precise-updates/universe i386 Packages [225 kB]
Get:44 http://us.archive.ubuntu.com precise-updates/multiverse i386 Packages [14.2 kB]
Get:45 http://us.archive.ubuntu.com precise-updates/main TranslationIndex [3,564 B]
Get:46 http://us.archive.ubuntu.com precise-updates/multiverse TranslationIndex [2,605 B]
Get:47 http://us.archive.ubuntu.com precise-updates/restricted TranslationIndex [2,461 B]
Get:48 http://us.archive.ubuntu.com precise-updates/universe TranslationIndex [2,850 B]
Get:49 http://us.archive.ubuntu.com precise-backports/main Sources [4,233 B]
Get:50 http://us.archive.ubuntu.com precise-backports/restricted Sources [14 B]
Get:51 http://us.archive.ubuntu.com precise-backports/universe Sources [36.1 kB]
Get:52 http://us.archive.ubuntu.com precise-backports/multiverse Sources [5,311 B]
Get:53 http://us.archive.ubuntu.com precise-backports/main i386 Packages [2,838 B]
Get:54 http://us.archive.ubuntu.com precise-backports/restricted i386 Packages [14 B]
Get:55 http://us.archive.ubuntu.com precise-backports/universe i386 Packages [36.7 kB]
Get:56 http://us.archive.ubuntu.com precise-backports/multiverse i386 Packages [5,178 B]
Get:57 http://us.archive.ubuntu.com precise-backports/main TranslationIndex [72 B]
Get:58 http://us.archive.ubuntu.com precise-backports/multiverse TranslationIndex [72 B]
Get:59 http://us.archive.ubuntu.com precise-backports/restricted TranslationIndex [70 B]
Get:60 http://us.archive.ubuntu.com precise-backports/universe TranslationIndex [73 B]
Get:61 http://us.archive.ubuntu.com precise/main Translation-en [726 kB]
Get:62 http://us.archive.ubuntu.com precise/multiverse Translation-en [93.4 kB]
Get:63 http://us.archive.ubuntu.com precise/restricted Translation-en [2,395 B]
Get:64 http://us.archive.ubuntu.com precise/universe Translation-en [3,341 kB]
Get:65 http://us.archive.ubuntu.com precise-updates/main Translation-en [317 kB]
Get:66 http://us.archive.ubuntu.com precise-updates/multiverse Translation-en [8,136 B]
Get:67 http://us.archive.ubuntu.com precise-updates/restricted Translation-en [2,637 B]
Get:68 http://us.archive.ubuntu.com precise-updates/universe Translation-en [129 kB]
Get:69 http://us.archive.ubuntu.com precise-backports/main Translation-en [2,072 B]
Get:70 http://us.archive.ubuntu.com precise-backports/multiverse Translation-en [4,610 B]
Get:71 http://us.archive.ubuntu.com precise-backports/restricted Translation-en [14 B]
Get:72 http://us.archive.ubuntu.com precise-backports/universe Translation-en [26.9 kB]
Fetched 19.6 MB in 1min 21s (242 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
The following extra packages will be installed:
dpkg-dev fakeroot g++ g++-4.6 git git-man libalgorithm-diff-perl
libalgorithm-diff-xs-perl libalgorithm-merge-perl libc-ares2 libdpkg-perl
liberror-perl libev4 libicu48 libstdc++6-4.6-dev libv8-3.7.12.22 make patch
python-pycurl unattended-upgrades
Suggested packages:
debian-keyring g++-multilib g++-4.6-multilib gcc-4.6-doc libstdc++6-4.6-dbg
git-daemon-run git-daemon-sysvinit git-doc git-el git-arch git-cvs git-svn
git-email git-gui gitk gitweb libstdc++6-4.6-doc make-doc diffutils-doc
libcurl4-gnutls-dev python-pycurl-dbg bsd-mailx
The following NEW packages will be installed:
build-essential dpkg-dev fakeroot g++ g++-4.6 git git-core git-man
libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl
libc-ares2 libdpkg-perl liberror-perl libev4 libicu48 libstdc++6-4.6-dev
libv8-3.7.12.22 make nodejs patch python-pycurl python-software-properties
unattended-upgrades
0 upgraded, 24 newly installed, 0 to remove and 155 not upgraded.
Need to get 26.5 MB of archives.
After this operation, 72.3 MB of additional disk space will be used.
Do you want to continue [Y/n]? Abort.
Reading package lists...
Building dependency tree...
Reading state information...
The following extra packages will be installed:
libgpm2 libpython2.7 python2.7 python2.7-minimal vim-common vim-runtime
vim-tiny
Suggested packages:
gpm python2.7-doc binfmt-support ctags vim-doc vim-scripts indent
The following NEW packages will be installed:
libgpm2 libpython2.7 vim vim-runtime
The following packages will be upgraded:
python2.7 python2.7-minimal vim-common vim-tiny
4 upgraded, 4 newly installed, 0 to remove and 151 not upgraded.
Need to get 13.2 MB of archives.
After this operation, 27.8 MB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu/ precise/main libgpm2 i386 1.20.4-4 [16.9 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main python2.7 i386 2.7.3-0ubuntu3.4 [2,647 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main python2.7-minimal i386 2.7.3-0ubuntu3.4 [1,690 kB]
Get:4 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main vim-tiny i386 2:7.3.429-2ubuntu2.1 [380 kB]
Get:5 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main vim-common i386 2:7.3.429-2ubuntu2.1 [85.8 kB]
Get:6 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main libpython2.7 i386 2.7.3-0ubuntu3.4 [1,148 kB]
Get:7 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main vim-runtime all 2:7.3.429-2ubuntu2.1 [6,277 kB]
Get:8 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main vim i386 2:7.3.429-2ubuntu2.1 [979 kB]
dpkg-preconfigure: unable to re-open stdin: No such file or directory
Fetched 13.2 MB in 49s (270 kB/s)
Selecting previously unselected package libgpm2.
(Reading database ... 29361 files and directories currently installed.)
Unpacking libgpm2 (from .../libgpm2_1.20.4-4_i386.deb) ...
Preparing to replace python2.7 2.7.3-0ubuntu3 (using .../python2.7_2.7.3-0ubuntu3.4_i386.deb) ...
Unpacking replacement python2.7 ...
Preparing to replace python2.7-minimal 2.7.3-0ubuntu3 (using .../python2.7-minimal_2.7.3-0ubuntu3.4_i386.deb) ...
Unpacking replacement python2.7-minimal ...
Processing triggers for man-db ...
Setting up python2.7-minimal (2.7.3-0ubuntu3.4) ...
(Reading database ... 29364 files and directories currently installed.)
Preparing to replace vim-tiny 2:7.3.429-2ubuntu2 (using .../vim-tiny_2%3a7.3.429-2ubuntu2.1_i386.deb) ...
Unpacking replacement vim-tiny ...
Preparing to replace vim-common 2:7.3.429-2ubuntu2 (using .../vim-common_2%3a7.3.429-2ubuntu2.1_i386.deb) ...
Unpacking replacement vim-common ...
Selecting previously unselected package libpython2.7.
Unpacking libpython2.7 (from .../libpython2.7_2.7.3-0ubuntu3.4_i386.deb) ...
Selecting previously unselected package vim-runtime.
Unpacking vim-runtime (from .../vim-runtime_2%3a7.3.429-2ubuntu2.1_all.deb) ...
Adding 'diversion of /usr/share/vim/vim73/doc/help.txt to /usr/share/vim/vim73/doc/help.txt.vim-tiny by vim-runtime'
Adding 'diversion of /usr/share/vim/vim73/doc/tags to /usr/share/vim/vim73/doc/tags.vim-tiny by vim-runtime'
Selecting previously unselected package vim.
Unpacking vim (from .../vim_2%3a7.3.429-2ubuntu2.1_i386.deb) ...
Processing triggers for man-db ...
Setting up libgpm2 (1.20.4-4) ...
Setting up python2.7 (2.7.3-0ubuntu3.4) ...
Setting up vim-common (2:7.3.429-2ubuntu2.1) ...
Setting up vim-tiny (2:7.3.429-2ubuntu2.1) ...
Setting up libpython2.7 (2.7.3-0ubuntu3.4) ...
Setting up vim-runtime (2:7.3.429-2ubuntu2.1) ...
Processing /usr/share/vim/addons/doc
Setting up vim (2:7.3.429-2ubuntu2.1) ...
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vim (vim) in auto mode.
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vimdiff (vimdiff) in auto mode.
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/rvim (rvim) in auto mode.
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/rview (rview) in auto mode.
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vi (vi) in auto mode.
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/view (view) in auto mode.
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/ex (ex) in auto mode.
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
I am running Vagrant 1.3.5 and VirtualBox 4.3.2 r90405 on Mac OSX Mavericks. I downgrade VirtualBox to 4.2.18 (I will change to 4.2.0) and installed vagrant-vbguest
vagrant plugin install vagrant-vbguest
Then I run this command.
$sudo /Library/StartupItems/VirtualBox/VirtualBox restart
Found at vagrant 'hostonlyif' create not working
I added -y to apt-get
apt-get update
apt-get -y install build-essential git-core python-software-properties nodejs
apt-get -y install vim
Then it installed all.

Resources