Thông tin để cài đặt tiện ích mở rộng PECL này có thể được tìm thấy trong chương thủ công có tiêu đề Cài đặt các phần mở rộng PECL. Thông tin bổ sung như phát hành mới, tải xuống, tệp nguồn, thông tin bảo trì và thay đổi, có thể được đặt tại đây: »& nbsp; //pecl.php.net/package/mongodb
Người dùng Linux, Unix và MacOS có thể chạy lệnh sau để cài đặt trình điều khiển:
$ sudo pecl install mongodb
Nếu hệ thống của bạn có nhiều phiên bản PHP được cài đặt (ví dụ: mặc định MacOS, homebrew, »& nbsp; xampp), lưu ý rằng mỗi phiên bản của PHP có lệnh PECL riêng và tệp php.ini. Ngoài ra, mỗi môi trường PHP (ví dụ: CLI, Web) có thể sử dụng các tệp PHP.ini riêng biệt.
Cài đặt trình điều khiển qua PECL sẽ sử dụng các phiên bản đi kèm của »& nbsp; libbson và» & nbsp; libmongoc và cố gắng tự động định cấu hình chúng.
Lưu ý: Nếu quá trình xây dựng không tìm thấy thư viện SSL, hãy kiểm tra xem các gói phát triển (ví dụ: libssl-dev) và »& NBSP; PKG-Config đều được cài đặt. Nếu điều đó không giải quyết vấn đề, hãy xem xét sử dụng quy trình cài đặt thủ công.: If the build process fails to find an SSL library, check that the development packages (e.g. libssl-dev) and » pkg-config are both installed. If that does not resolve the problem, consider using the manual installation process.
Cuối cùng, thêm dòng sau vào tệp php.ini cho từng môi trường mà bạn dự định sử dụng trình điều khiển:
Mohammadhoseinmazalahi tại Gmail Dot Com ¶ ¶
2 năm trước
As of Ubuntu 20.04, php-mongodb in the database is outdated and you'll need the PECL method to install latest version of MongoDB.
To do this in Ubuntu, you'll need the php-pear plugin and php-dev:
sudo apt install php-dev php-pear
then you can run:
sudo pecl install mongodb
tiếp xúc ? Automatix: thông tin ¶ ¶
6 năm trước
An additional requirement might be pkg-config (on Ubuntu 14.04).
$ pecl install mongodb
...
configure: error: Cannot find OpenSSL's libraries
ERROR: `/tmp/pear/temp/mongodb/configure --with-php-config=/usr/bin/php-config' failed
But:
$ apt-get install pkg-config
...
Setting up pkg-config (0.26-1ubuntu4) ...
$ pecl install mongodb
...
Build process completed successfully
Installing '/usr/lib/php/20151012/mongodb.so'
install ok: channel://pecl.php.net/mongodb-1.1.7
configuration option "php_ini" is not set to php.ini location
You should add "extension=mongodb.so" to php.ini
rafael_xuvisco tại yahoo dot com dot br ¶ ¶
5 năm trước
libssl-dev1
libssl-dev2
libssl-dev3
libssl-dev4
libssl-dev5
libssl-dev6
libssl-dev7
libssl-dev8
libssl-dev9
Ẩn danh ¶ ¶
6 năm trước
As of Ubuntu 20.04, php-mongodb in the database is outdated and you'll need the PECL method to install latest version of MongoDB.1
As of Ubuntu 20.04, php-mongodb in the database is outdated and you'll need the PECL method to install latest version of MongoDB.2
rafael_xuvisco tại yahoo dot com dot br ¶ ¶
6 năm trước
As of Ubuntu 20.04, php-mongodb in the database is outdated and you'll need the PECL method to install latest version of MongoDB.4
As of Ubuntu 20.04, php-mongodb in the database is outdated and you'll need the PECL method to install latest version of MongoDB.5
As of Ubuntu 20.04, php-mongodb in the database is outdated and you'll need the PECL method to install latest version of MongoDB.6
rafael_xuvisco tại yahoo dot com dot br ¶ ¶
5 năm trước
As of Ubuntu 20.04, php-mongodb in the database is outdated and you'll need the PECL method to install latest version of MongoDB.8
As of Ubuntu 20.04, php-mongodb in the database is outdated and you'll need the PECL method to install latest version of MongoDB.9
To do this in Ubuntu, you'll need the php-pear plugin and php-dev:
sudo apt install php-dev php-pear0
To do this in Ubuntu, you'll need the php-pear plugin and php-dev:
sudo apt install php-dev php-pear1
To do this in Ubuntu, you'll need the php-pear plugin and php-dev:
sudo apt install php-dev php-pear2
To do this in Ubuntu, you'll need the php-pear plugin and php-dev:
sudo apt install php-dev php-pear3
Ẩn danh ¶ ¶
5 năm trước
To do this in Ubuntu, you'll need the php-pear plugin and php-dev:
sudo apt install php-dev php-pear5
To do this in Ubuntu, you'll need the php-pear plugin and php-dev:
sudo apt install php-dev php-pear6
Ẩn danh ¶ ¶
5 năm trước
To do this in Ubuntu, you'll need the php-pear plugin and php-dev:
sudo apt install php-dev php-pear8
To do this in Ubuntu, you'll need the php-pear plugin and php-dev:
sudo apt install php-dev php-pear9
then you can run:
sudo pecl install mongodb0
then you can run:
sudo pecl install mongodb1
then you can run:
sudo pecl install mongodb2
then you can run:
sudo pecl install mongodb3
Ẩn danh ¶ ¶
5 năm trước
then you can run:
sudo pecl install mongodb5
then you can run:
sudo pecl install mongodb6
then you can run:
sudo pecl install mongodb7