Skip to content

Instantly share code, notes, and snippets.

@jseabold
Last active December 26, 2015 10:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jseabold/7139282 to your computer and use it in GitHub Desktop.
Save jseabold/7139282 to your computer and use it in GitHub Desktop.
Create a 32-bit chroot environment

Create the chroot

sudo apt-get install debootstrap schroot
CHROOT=/tmp/saucy-i386; mkdir -p $CHROOT; sudo debootstrap --arch=i386 --include=python-pandas,sudo,wget --components=main,universe,multiverse saucy $CHROOT http://debian.lcs.mit.edu/ubuntu

echo -e "[saucy-i386]\ndescription=Ubuntu saucy  i386 architecture\ndirectory=$CHROOT\ntype=directory\nusers=$USER\nroot-groups=root\n" | sudo bash -c 'cat - > /etc/schroot/chroot.d/saucy-i386'

Enter the chroot

schroot -c saucy-i386 

Get packages from neurodebian

wget -O- http://neuro.debian.net/lists/saucy.us-nh.full | sudo tee /etc/apt/sources.list.d/neurodebian.sources.list
sudo apt-key adv --recv-keys --keyserver pgp.mit.edu 2649A5A9
sudo sed -ie 's,#deb-src ,deb-src ,g' /etc/apt/sources.list.d/neurodebian.sources.list
sudo apt-get update
sudo apt-get build-dep python-statsmodels

Troubleshooting

  • You might need to temporarily move your ~/.local directory to avoid conflicts with packages locally installed by pip.
  • To run GUIs, you need to find out your display outside of the chroot. echo $DISPLAY and then set it in the chroot environment. export DISPLAY=...
@yarikoptic
Copy link

some new lines got eaten so be careful ;)

@jseabold
Copy link
Author

Yeah I just noticed. Fixed.

@jseabold
Copy link
Author

jseabold commented Jun 2, 2014

@yarikoptic any hints on removing this after installed? I'm trying to get firefox to run in 32-bit and have messed up mightily I fear...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment