0

0

Turso libSQL 安装程序

WBOY

WBOY

发布时间:2024-07-15 16:40:43

|

520人浏览过

|

来源于dev.to

转载

你好朋克!是的,我是,在这篇日志中我想与您分享如何在您的 php 环境中安装 libsql,而不必担心在您当前的 php 版本中配置 php.ini 文件。

安装 php 的 libsql 扩展,就像安装 composer 包一样:

composer require vendor/package

安装 php 的 libsql 扩展

turso-php-installer install

turso php installer

无论如何...我想让你知道 punk'in 单文件安装程序脚本如何工作并为你设置它。

帮助命令

您已经在上图中看到了。这就是帮助命令的作用。

安装命令

安装命令在安装 php 的 libsql 扩展之前会做一些必要的检查,会问什么问题? (后台查看)

您使用的是 windows 吗?

尽管 turso client php 具有针对 windows msvc 2022 构建的扩展。但是,使用此安装程序脚本的安装过程不适用于 windows。 wsl 可以工作,或者您可以使用 turso docker php!

如果您使用的是 windows,那么您将收到此消息:

> turso-php-installer install # in windows
sorry, turso php installer is only support for linux and macos.

you are using windows, you can try our alternative using dev containers
visit: https://github.com/darkterminal/turso-docker-php

thank you!

你在使用 laravel herd 吗?

天哪...安装程序还不支持 laravel herd。但我很快就会支持,你可以在 herd 社区 github discussion 上关注这个讨论。

$ turso-php-installer install
you are using laravel herd
sorry, laravel herd is not supported yet.
you can try our alternative using dev containers
visit: https://github.com/darkterminal/turso-docker-php

thank you!

已经安装

有时我忘记什么时候已经安装了。

MimicPC
MimicPC

一个AI驱动的浏览器运行工具,可以通过浏览器在线安装及运行各种开源的AI应用程序

下载
$ turso-php-installer install
turso client php is already installed and configured!

哪个 php 版本?

适用于 php 的 turso 客户端 php / libsql 扩展至少需要 php 8.0 及更高版本。您可以在 turso client php - release 页面看到它

如果你的 php 低于最低要求,那么就会失败

$ turso-php-installer install
oops! your php version environment does not meet the requirements.
need a minimal php 8.0 installed on your environment.

检查php.ini

需要查找安装程序脚本

$ turso-php-installer install
you don't have php install globaly in your environment
turso client php lookup php.ini file and it's not found

检查所需功能

安装脚本还需要shell_exec和curl函数

$ turso-php-installer install
it looks like the 'shell_exec' and 'curl_version' functions are disabled in your php environment. these functions are essential for this script to work properly.
to enable them, follow these steps:
1. open your 'php.ini' file. you can find the location of your 'php.ini' file by running the command 'php --ini' in your terminal or command prompt.
2. search for 'disable_functions' directive. it might look something like this:
disable_functions = shell_exec, curl_version
3. remove 'shell_exec' and 'curl_version' from this list. it should look like:
disable_functions =
4. save the 'php.ini' file.
5. restart your web server for the changes to take effect. if you are using apache, you can restart it with:
sudo service apache2 restart
or for nginx:
sudo service nginx restart
if you are using a web hosting service, you might need to contact your hosting provider to enable these functions for you.
for more information on 'shell_exec', visit: https://www.php.net/manual/en/function.shell-exec.php
for more information on 'curl_version', visit: https://www.php.net/manual/en/function.curl-version.php
thank you!

请求许可

安装程序需要以sudo角色运行,因为安装程序需要在您的环境中编写php.ini文件。

$ turso-php-installer install
Turso need to install the client extension in your PHP environment.
This script will ask your sudo password to modify your php.ini file:
Are you ok? [y/N]: 

下载并解压

满足所有要求后,安装程序将根据您环境中使用的当前 php 版本下载并提取 php 的 libsql 扩展,并将其存储在 $home/.turso-client-php


使用 turso driver laravel 和 turso doctrine dbal 之前需要扩展

热门AI工具

更多
DeepSeek
DeepSeek

幻方量化公司旗下的开源大模型平台

豆包大模型
豆包大模型

字节跳动自主研发的一系列大型语言模型

通义千问
通义千问

阿里巴巴推出的全能AI助手

腾讯元宝
腾讯元宝

腾讯混元平台推出的AI助手

文心一言
文心一言

文心一言是百度开发的AI聊天机器人,通过对话可以生成各种形式的内容。

讯飞写作
讯飞写作

基于讯飞星火大模型的AI写作工具,可以快速生成新闻稿件、品宣文案、工作总结、心得体会等各种文文稿

即梦AI
即梦AI

一站式AI创作平台,免费AI图片和视频生成。

ChatGPT
ChatGPT

最最强大的AI聊天机器人程序,ChatGPT不单是聊天机器人,还能进行撰写邮件、视频脚本、文案、翻译、代码等任务。

相关专题

更多
laravel组件介绍
laravel组件介绍

laravel 提供了丰富的组件,包括身份验证、模板引擎、缓存、命令行工具、数据库交互、对象关系映射器、事件处理、文件操作、电子邮件发送、队列管理和数据验证。想了解更多laravel的相关内容,可以阅读本专题下面的文章。

319

2024.04.09

laravel中间件介绍
laravel中间件介绍

laravel 中间件分为五种类型:全局、路由、组、终止和自定。想了解更多laravel中间件的相关内容,可以阅读本专题下面的文章。

278

2024.04.09

laravel使用的设计模式有哪些
laravel使用的设计模式有哪些

laravel使用的设计模式有:1、单例模式;2、工厂方法模式;3、建造者模式;4、适配器模式;5、装饰器模式;6、策略模式;7、观察者模式。想了解更多laravel的相关内容,可以阅读本专题下面的文章。

372

2024.04.09

thinkphp和laravel哪个简单
thinkphp和laravel哪个简单

对于初学者来说,laravel 的入门门槛较低,更易上手,原因包括:1. 更简单的安装和配置;2. 丰富的文档和社区支持;3. 简洁易懂的语法和 api;4. 平缓的学习曲线。本专题为大家提供相关的文章、下载、课程内容,供大家免费下载体验。

374

2024.04.10

laravel入门教程
laravel入门教程

本专题整合了laravel入门教程,想了解更多详细内容,请阅读专题下面的文章。

85

2025.08.05

laravel实战教程
laravel实战教程

本专题整合了laravel实战教程,阅读专题下面的文章了解更多详细内容。

65

2025.08.05

laravel面试题
laravel面试题

本专题整合了laravel面试题相关内容,阅读专题下面的文章了解更多详细内容。

68

2025.08.05

composer是什么插件
composer是什么插件

Composer是一个PHP的依赖管理工具,它可以帮助开发者在PHP项目中管理和安装依赖的库文件。Composer通过一个中央化的存储库来管理所有的依赖库文件,这个存储库包含了各种可用的依赖库的信息和版本信息。本专题为大家提供相关的文章、下载、课程内容,供大家免费下载体验。

151

2023.12.25

Python 自然语言处理(NLP)基础与实战
Python 自然语言处理(NLP)基础与实战

本专题系统讲解 Python 在自然语言处理(NLP)领域的基础方法与实战应用,涵盖文本预处理(分词、去停用词)、词性标注、命名实体识别、关键词提取、情感分析,以及常用 NLP 库(NLTK、spaCy)的核心用法。通过真实文本案例,帮助学习者掌握 使用 Python 进行文本分析与语言数据处理的完整流程,适用于内容分析、舆情监测与智能文本应用场景。

10

2026.01.27

热门下载

更多
网站特效
/
网站源码
/
网站素材
/
前端模板

精品课程

更多
相关推荐
/
热门推荐
/
最新课程
PostgreSQL 教程
PostgreSQL 教程

共48课时 | 7.9万人学习

Git 教程
Git 教程

共21课时 | 3.1万人学习

关于我们 免责申明 举报中心 意见反馈 讲师合作 广告合作 最新更新
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送

Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号