0

I'm trying to install Django on Hostgator's File Manager because I've already finished a web app that's ready for deployment. According to this, Django should be supported. But when I execute

pip install django 

after SSHing into the File Manager shell, I get an error which reads

error: could not create '/opt/python27/lib/python2.7/site-packages/django' : Read only file sysem

I've tried similar attempts at installing node.js and other frameworks with pip, all which have yielded a similar read-only error, which leads me to believe that it's a settings issue. Otherwise, how could anyone deploy their website if all framework installations are blocked?

Adam Freymiller
  • 1,929
  • 7
  • 27
  • 49

1 Answers1

0

try sudo pip install django instead. That will ask you a password for the root user.

As mentioned below, you can test out sudo -s all by itself to make sure you get it to work.

audrey:tests jluc$ sudo -s
W$exit
exit
audrey:tests jluc$

See also sudo pip install VS pip install --user.

Community
  • 1
  • 1
JL Peyret
  • 10,917
  • 2
  • 54
  • 73
  • Tried that, here is the result: sudo: effective uid is not 0, is sudo installed suid root? – Adam Freymiller Aug 07 '15 at 03:07
  • Can you get sudo to work on its own? Does HostGator provide support/docs about that? Sooner or later you'll want to sudo something. – JL Peyret Aug 07 '15 at 03:14
  • My website is shared hosting, and I think sudo is only supported on Hostgator for VPS. sudo -s yields the same result as in my first comment to your answer – Adam Freymiller Aug 07 '15 at 03:18
  • well, check out the answers in the --user link I posted. Maybe they can apply to you? Sorry, can't really help all that much wrt HostGator, only that basic pip install needs sudo. So either use one of the workarounds suggested or research HostGator for sudo usage. – JL Peyret Aug 07 '15 at 03:23