Laravel tntsearch-driver无法安装

时间:2017-08-28 11:32:22

标签: php laravel composer-php php-ini php-curl

下面是我的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: enter image description here

我的php版本是7.0

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

2 个答案:

答案 0 :(得分:0)

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

答案 1 :(得分:0)

我们可以安装pdo_ sqlite

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

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