Laravel tntsearch-driver 无法安装

Laravel tntsearch-driver can not installed

下面是我的composer.json文件

    {
    "name": "laravel/laravel",
    "description": "The Laravel Framework.",
    "keywords": ["framework", "laravel"],
    "license": "MIT",
    "type": "project",
    "require": {
        "php": ">=5.6.4",
        "algolia/algoliasearch-client-php": "^1.18",
        "barryvdh/laravel-cors": "^0.9.2",
        "laravel/framework": "5.4.*",
        "laravel/passport": "^3.0",
        "laravel/scout": "^3.0",
        "laravel/tinker": "~1.0"
    },
    "require-dev": {
        "fzaninotto/faker": "~1.4",
        "mockery/mockery": "0.9.*",
        "phpunit/phpunit": "~5.7"
    },
    "autoload": {
        "classmap": [
            "database"
        ],
        "psr-4": {
            "App\": "app/"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "Tests\": "tests/"
        }
    },
    "scripts": {
        "post-root-package-install": [
            "php -r \"file_exists('.env') || copy('.env.example', '.env');\""
        ],
        "post-create-project-cmd": [
            "php artisan key:generate"
        ],
        "post-install-cmd": [
            "Illuminate\Foundation\ComposerScripts::postInstall",
            "php artisan optimize"
        ],
        "post-update-cmd": [
            "Illuminate\Foundation\ComposerScripts::postUpdate",
            "php artisan optimize"
        ]
    },
    "config": {
        "preferred-install": "dist",
        "sort-packages": true,
        "optimize-autoloader": true
    }
}

我想为 laravel scout 安装 tntsearch-driver 但出现错误 To enable extensions, verify that they are enabled in your .ini files:

我的php版本是7.0

我已经尝试过 sudo apt-get install php7.0-curl 但对我没有帮助。 当试图通过 curl-v 检查 curl 版本时给我错误 curl: no URL specified!

Tntsearch需要开启sqlite和pdo扩展,可以使用php -m查看是否有这两个扩展。 我猜你没有打开 sqlite 扩展。

我们可以安装pdo_ sqlite

如果您使用的是 php5,则 sudo apt-get install php5-sqlite

如果您使用 php7 那么 sudo apt-get install php7-sqlite