Ask Your Question
0

unable to install openstack permisson denied

asked 2020-05-14 07:14:11 -0500

zelda gravatar image

updated 2020-05-14 12:37:32 -0500

Hi guys am trying to install openstack on vmware to test and explore but am getting permission denied error

Exception:
Traceback (most recent call last):
  File "/opt/stack/requirements/.venv/lib/python3.6/site-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/opt/stack/requirements/.venv/lib/python3.6/site-packages/pip/commands/install.py", line 342, in run
    requirement_set.prepare_files(finder)
  File "/opt/stack/requirements/.venv/lib/python3.6/site-packages/pip/req/req_set.py", line 380, in prepare_files
    ignore_dependencies=self.ignore_dependencies))
  File "/opt/stack/requirements/.venv/lib/python3.6/site-packages/pip/req/req_set.py", line 554, in _prepare_file
    require_hashes
  File "/opt/stack/requirements/.venv/lib/python3.6/site-packages/pip/req/req_install.py", line 281, in populate_link
    self.link = self._wheel_cache.cached_wheel(self.link, self.name)
  File "/opt/stack/requirements/.venv/lib/python3.6/site-packages/pip/wheel.py", line 68, in cached_wheel
    self._cache_dir, link, self._format_control, package_name)
  File "/opt/stack/requirements/.venv/lib/python3.6/site-packages/pip/wheel.py", line 129, in cached_wheel
    wheel_names = os.listdir(root)
PermissionError: [Errno 13] Permission denied: '/opt/stack/.cache/pip/wheels/a7/c1/ea/cf5bd31012e735dc1dfea3131a2d5eae7978b251083d6247bd'

Here is how am doing installation

some basic updates

sudo apt-get update
sudo apt-get upgrade

sudo apt-get dist-upgrade

sudo apt-get install git -y

sudo reboot

create stack uer

sudo useradd -s /bin/bash -d /opt/stack -m stack
echo "stack ALL=(ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/stack
sudo su - stack

i also run the tools/create-stack-user.sh

next i did clone repo

git clone https://git.openstack.org/openstack-dev/devstack
cd devstack

create local.conf file

    nano local.conf

   # local.conf content
    [[local|localrc]]
    ADMIN_PASSWORD=pass12345
    DATABASE_PASSWORD=$ADMIN_PASSWORD
    RABBIT_PASSWORD=$ADMIN_PASSWORD

last install command

./stack.sh

and then i got the above error am on Ubuntu 18 64 bit

   Static hostname: ubuntu
         Icon name: computer-vm
           Chassis: vm
        Machine ID: c3ac1d30d6884d0b8291acee7c82c39f
           Boot ID: ebab032ff516480d91ad0c18862b2319
    Virtualization: vmware
  Operating System: Ubuntu 18.04.4 LTS
            Kernel: Linux 5.3.0-28-generic
      Architecture: x86-64

Update : the permission error is resolved by giving permission to stack user , earlier i thought its writing conflict

sudo chown -R stack:stack /opt/stack/.cache

sudo chmod -R 755 /opt/stack/.cache

Error :

Installing collected packages: oslo.rootwrap, retrying, os-win, oslo.privsep, os-brick, simplejson, python-cinderclient, glance-store
  Attempting uninstall: simplejson
    Found existing installation: simplejson 3.13.2
ERROR: Cannot uninstall 'simplejson'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
+inc/python:pip_install:1                  exit_trap
+./stack.sh:exit_trap:489                  local r=1
++./stack.sh:exit_trap:490                  jobs -p
+./stack.sh:exit_trap:490                  jobs=
+./stack.sh:exit_trap:493                  [[ -n '' ]]
+./stack.sh:exit_trap:499                  '[' -f '' ']'
+./stack.sh:exit_trap:504                  kill_spinner
+./stack.sh:kill_spinner:399               '[' '!' -z '' ']'
+./stack.sh:exit_trap:506                  [[ 1 -ne 0 ]]
+./stack.sh:exit_trap:507                  echo 'Error on exit'
Error on exit
+./stack.sh:exit_trap:509                  type -p generate-subunit
+./stack.sh:exit_trap:510                  generate-subunit 1589476087 780 fail
+./stack.sh:exit_trap:512                  [[ -z /opt/stack/logs ]]
+./stack.sh:exit_trap ...
(more)
edit retag flag offensive close merge delete

Comments

1

I believe the docs state somewhere to change ownership of the subdirectory under /opt/stack...

eblock gravatar imageeblock ( 2020-05-14 10:25:39 -0500 )edit

@eblock thanks that permission denied issue is resolved now am getting new error can u please Question i updated it thanks

zelda gravatar imagezelda ( 2020-05-14 12:38:23 -0500 )edit

Sounds like the rollback isn't working (ERROR: Cannot uninstall 'simplejson'), I'm not sure how to deal with that. Isn't there also a script to rollback?

eblock gravatar imageeblock ( 2020-05-15 03:35:26 -0500 )edit

i tried to remove : simplejson but there is no package on simplejson , but there are python packages which contain simplejson keyboard in it

zelda gravatar imagezelda ( 2020-05-16 03:59:13 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2020-05-23 02:48:00 -0500

ivan gravatar image

Im having same error

Found existing installation: simplejson 3.13.2 ERROR: Cannot uninstall 'simplejson'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2020-05-14 07:14:11 -0500

Seen: 35 times

Last updated: May 14