Skip to content
This repository has been archived by the owner on Nov 29, 2019. It is now read-only.

Docker build fails with "Not uninstalling setuptools at /usr/lib/python2.7/dist-packages, owned by OS" #479

Open
clauded opened this issue Jul 25, 2018 · 0 comments

Comments

@clauded
Copy link

clauded commented Jul 25, 2018

I'm trying to build a docker image on Debian Stretch like this:

sudo apt update
sudo apt-get install -y apt-transport-https ca-certificates curl gnupg2 software-properties-common
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable"
sudo apt update
sudo apt-get install -y git docker-ce
git clone https://github.com/assembl/assembl.git
cd assembl
sudo docker build --tag assembl docker

and this returns the following error:

[localhost] out: Installing collected packages: setuptools, pip
[localhost] out: Found existing installation: setuptools 5.5.1
[localhost] out: Not uninstalling setuptools at /usr/lib/python2.7/dist-packages, owned by OS
[localhost] out: Can't roll back setuptools; was not uninstalled
[localhost] out: Cleaning up...
[localhost] out: Exception:
[localhost] out: Traceback (most recent call last):
[localhost] out: File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
[localhost] out: status = self.run(options, args)
[localhost] out: File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 295, in run
[localhost] out: requirement_set.install(install_options, global_options, root=options.root_path)
[localhost] out: File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1436, in install
[localhost] out: requirement.install(install_options, global_options, *args, **kwargs)
[localhost] out: File "/usr/lib/python2.7/dist-packages/pip/req.py", line 672, in install
[localhost] out: self.move_wheel_files(self.source_dir, root=root)
[localhost] out: File "/usr/lib/python2.7/dist-packages/pip/req.py", line 902, in move_wheel_files
[localhost] out: pycompile=self.pycompile,
[localhost] out: File "/usr/lib/python2.7/dist-packages/pip/wheel.py", line 214, in move_wheel_files
[localhost] out: clobber(source, lib_dir, True)
[localhost] out: File "/usr/lib/python2.7/dist-packages/pip/wheel.py", line 208, in clobber
[localhost] out: shutil.copy2(srcfile, destfile)
[localhost] out: File "/usr/lib/python2.7/shutil.py", line 130, in copy2
[localhost] out: copyfile(src, dst)
[localhost] out: File "/usr/lib/python2.7/shutil.py", line 83, in copyfile
[localhost] out: with open(dst, 'wb') as fdst:
[localhost] out: IOError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/easy_install.py'
[localhost] out:
[localhost] out: Storing debug log for failure in /home/assembl_user/.pip/pip.log
[localhost] out:
Fatal error: run() received nonzero return code 2 while executing!
Requested: cd /opt/assembl && . /opt/assembl/venv/bin/activate && pip install -U setuptools "pip<10"
Executed: /bin/bash -l -c "cd /opt/assembl && . /opt/assembl/venv/bin/activate && pip install -U setuptools "pip<10" "
Aborting.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant