chmod: changing permissions of `/usr/local/bin/...

   python@ubuntu118:~/Django-1.4.1$ python setup.py install  
   running install  
   running build  
   running build_py  
   running build_scripts  
   running install_lib  
   running install_scripts  
   changing mode of /usr/local/bin/django-admin.py to 755  
   error: /usr/local/bin/django-admin.py: Operation not permitted  
   python@ubuntu118:~/Django-1.4.1$ chmod 755 /usr/local/bin/django-admin.py   
   chmod: changing permissions of `/usr/local/bin/django-admin.py': Operation not permitted  
   python@ubuntu118:~/Django-1.4.1$ sudo chmod 755 /usr/local/bin/django-admin.py   

切换到root用户找到该文件直接删除,在安装django1.4版本前要删除django1.3版本的所有信息,否则安装后还是1.3版本的。具体如下:

    python@ubuntu118:~/Django-1.4.1$ su   
    Password:    
    root@ubuntu118:/home/python/Django-1.4.1# cd /usr/local/bin   
    root@ubuntu118:/usr/local/bin# ll   
    total 12   
    drwxr-xr-x  2 hadoop hadoop 4096 Sep 26 16:32 ./   
    drwxr-xr-x 10 hadoop hadoop 4096 Aug 14 20:12 ../   
    -rwxr-xr-x  1 root   root    124 Sep 26 16:32 django-admin.py*   
    root@ubuntu118:/usr/local/bin# rm django-admin.py    
    root@ubuntu118:/usr/local/bin# ll   
    total 8   
    drwxr-xr-x  2 hadoop hadoop 4096 Sep 27 10:30 ./   
    drwxr-xr-x 10 hadoop hadoop 4096 Aug 14 20:12 ../   

本文参与腾讯云自媒体分享计划,欢迎正在阅读的你也加入,一起分享。

发表于

我来说两句

0 条评论
登录 后参与评论

扫码关注云+社区

领取腾讯云代金券