Lab 0: Environment Set up
In this lab I use docker with ubuntu to finish.
$ docker pull ubuntu
$ docker container run -it --platform linux/amd64 -v /Users/eve/Desktop/CS/Computer\ Architecture/CSAPP/Labs/Lab1_Data/Code:/datalab-handout --name=csapp_env ubuntu /bin/bash
$
/Users/eve/Desktop/CS/Computer\ Architecture/CSAPP/Labs/Lab1_Data/Code
is the path
:/datalab-handout
is my file name.Docker默认创建的是arm架构的Ubuntu,如果没有指定为amd64,将无法安装gcc -m32
https://zhuanlan.zhihu.com/p/339047608?utm_id=0
https://blog.csdn.net/weixin_52693116/article/details/133149517
https://blog.csdn.net/weixin_44071773/article/details/120785642
$ apt-get update
$ apt-get install sudo
$ sudo apt-get install build-essential
$ sudo apt-get install gcc-multilib
$ sudo apt-get install gdb
进入容器