【发布时间】:2020-11-12 09:12:56
【问题描述】:
我正在尝试在 Hostgator 上托管一个 Django (v. 2.2.14) 网站。但是,Django 抱怨 SQLite 版本:
django.core.exceptions.ImproperlyConfigured: SQLite 3.8.3 or later is required (found 3.6.20).
我无法访问 yum 来更新 SQLite:
CRITICAL:yum.cli:Config Error: Error accessing file for config file:///etc/yum.conf
我尝试从源代码编译它,但我无法访问任何 C 编译器。当我尝试运行 ./configure 时会发生这种情况:
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.
在尝试使用 gcc 时会发生这种情况(因为我工作的公司购买的计划无法访问 C.):
bash: /usr/bin/gcc: Permission denied
我需要使用 Django,并且需要使用 Hostgator 的这个计划。有没有办法让我在我的机器上编译 gcc 或 SQLite 3.8.3,然后将文件发送到远程服务器?或者我可以做些什么来解决这个问题?
我想我可以使用 Django 1 或任何其他旧版本,但这对我来说太复杂了,因为我的网站已经完成了。
【问题讨论】:
-
我也不能选择真正的数据库吗?
psycopg2-binary无需编译即可安装在 linux 上。 -
PostgreSQL 在我当前的计划中不可用,我还能安装它吗?
-
恐怕同样的 catch-22。百胜或海湾合作委员会。如果你被这个平台困住了,那么就没有什么可做的了,然后降级 Django,或者也许 fork 一个较旧的
django.db.backends.sqlite并将其粘贴到你的应用程序中,然后将其配置为后端?
标签: django linux sqlite gcc server