I'm able to reproduce the problem w/ the following Vagrantfile (Ubuntu 23.04 guest):
# -*- mode: ruby -*-
# vi: set ft=ruby :
Site = "crbienes"
Box = Site + "-test"
Vagrant.configure("2") do |config|
# Every Vagrant development environment requires a box. You can search for boxes at https://vagrantcloud.com/search.
config.vm.box = "vasilli/Ubuntu-23.04-LAMP"
config.vm.define Box
config.vm.hostname = Box
config.vm.network "private_network", ip: "192.168.70.11"
config.vm.provider "virtualbox" do |vb|
vb.name = Box
end
config.vm.provision "shell", inline: <<-SHELL
sudo apt-get update
sudo apt-get install -y python-pip python-dev python-setuptools build-essential
sudo pip install numpy
SHELL
end
I'm getting this error:
crbienes-test: Package python-dev is not available, but is referred to by another package.
crbienes-test: This may mean that the package is missing, has been obsoleted, or
crbienes-test: is only available from another source
crbienes-test: However the following packages replace it:
crbienes-test: python-dev-is-python3
crbienes-test:
crbienes-test: Package python-setuptools is not available, but is referred to by another package.
crbienes-test: This may mean that the package is missing, has been obsoleted, or
crbienes-test: is only available from another source
crbienes-test:
crbienes-test: Package python-pip is not available, but is referred to by another package.
crbienes-test: This may mean that the package is missing, has been obsoleted, or
crbienes-test: is only available from another source
crbienes-test: However the following packages replace it:
crbienes-test: python3-pip
If I SSH into the guest I'm getting the exact same error, so that's good, consistent.
I'm able to install python-dev-is-python3 and python3-pip via apt install. When I try to install build-essential I get a warning that I already have the latest version. But it still works (as in tries to install). I could not install/find python-setuptools. Seems like it's deprecated. You should search for alternatives.
This is your new Vagrantfile. I removed 'sudo' b/c the shell script is running as sudo by default, you don't need to explicitly specify it.:
# -*- mode: ruby -*-
# vi: set ft=ruby :
Site = "crbienes"
Box = Site + "-test"
Vagrant.configure("2") do |config|
# Every Vagrant development environment requires a box. You can search for boxes at https://vagrantcloud.com/search.
config.vm.box = "vasilli/Ubuntu-23.04-LAMP"
config.vm.define Box
config.vm.hostname = Box
config.vm.network "private_network", ip: "192.168.70.11"
config.vm.provider "virtualbox" do |vb|
vb.name = Box
vb.linked_clone = true # saves time/space by not copying the box
end
config.vm.provision "shell", inline: <<-SHELL
apt-get update
apt-get install -y python3-pip python-dev-is-python3 build-essential
pip install numpy # this gives me an error, you should investigate
SHELL
end