Hướng dẫn couldn t find any package by glob php7 4 mcrypt - không thể tìm thấy bất kỳ gói nào bằng freeship php7 4 mcrypt

Gói

# Install prerequisites
sudo apt-get install php-dev libmcrypt-dev gcc make autoconf libc-dev pkg-config

# Compile mcrypt extension
sudo pecl install mcrypt-1.0.1
# Just press enter when it asks about libmcrypt prefix

# Enable extension for apache
echo "extension=mcrypt.so" | sudo tee -a /etc/php/7.2/apache2/conf.d/mcrypt.ini

# Restart apache
sudo service apache2 restart
1 có bị thiếu trong máy chủ Ubuntu 18.04 LT không?

apt install php-mcrypt
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package php-mcrypt is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'php-mcrypt' has no installation candidate

Hướng dẫn couldn t find any package by glob php7 4 mcrypt - không thể tìm thấy bất kỳ gói nào bằng freeship php7 4 mcrypt

Melebius

10,7K8 Huy hiệu vàng47 Huy hiệu bạc73 Huy hiệu đồng8 gold badges47 silver badges73 bronze badges

Đã hỏi ngày 4 tháng 5 năm 2018 lúc 10:38May 4, 2018 at 10:38

Andrea Rossettiandrea RossettiAndrea Rossetti

3811 Huy hiệu vàng3 Huy hiệu bạc3 Huy hiệu đồng1 gold badge3 silver badges3 bronze badges

1

McRypt đã không được dùng trong Php 7.2, vì vậy nó không có sẵn theo mặc định.

Bạn vẫn có thể cài đặt tiện ích mở rộng McRypt bằng PECL. Các hướng dẫn này dành cho máy chủ web

# Install prerequisites
sudo apt-get install php-dev libmcrypt-dev gcc make autoconf libc-dev pkg-config

# Compile mcrypt extension
sudo pecl install mcrypt-1.0.1
# Just press enter when it asks about libmcrypt prefix

# Enable extension for apache
echo "extension=mcrypt.so" | sudo tee -a /etc/php/7.2/apache2/conf.d/mcrypt.ini

# Restart apache
sudo service apache2 restart
2.

# Install prerequisites
sudo apt-get install php-dev libmcrypt-dev gcc make autoconf libc-dev pkg-config

# Compile mcrypt extension
sudo pecl install mcrypt-1.0.1
# Just press enter when it asks about libmcrypt prefix

# Enable extension for apache
echo "extension=mcrypt.so" | sudo tee -a /etc/php/7.2/apache2/conf.d/mcrypt.ini

# Restart apache
sudo service apache2 restart

Điều đó sẽ khiến bạn đi.

Về lâu dài, bạn có thể muốn thay thế

# Install prerequisites
sudo apt-get install php-dev libmcrypt-dev gcc make autoconf libc-dev pkg-config

# Compile mcrypt extension
sudo pecl install mcrypt-1.0.1
# Just press enter when it asks about libmcrypt prefix

# Enable extension for apache
echo "extension=mcrypt.so" | sudo tee -a /etc/php/7.2/apache2/conf.d/mcrypt.ini

# Restart apache
sudo service apache2 restart
3, nó bị phản đối vì một lý do.

Đã trả lời ngày 17 tháng 5 năm 2018 lúc 13:45May 17, 2018 at 13:45

3

Tôi đã làm như sau để có được hoạt động này ...

sudo add-apt-repository ppa:ondrej/php
sudo apt-get install php7.1-mcrypt

Nếu bạn đang chạy PHP5.6 hoặc 7.0 thì bạn có thể sử dụng những thứ sau

sudo apt-get install php5.6-mcrypt
sudo apt-get install php7.0-mcrypt

Đã trả lời ngày 5 tháng 5 năm 2018 lúc 18:37May 5, 2018 at 18:37

Hướng dẫn couldn t find any package by glob php7 4 mcrypt - không thể tìm thấy bất kỳ gói nào bằng freeship php7 4 mcrypt

2

Trước tiên, hãy kiểm tra xem mô -đun PHP McRypt có mặt không:

$ php -m | grep mcrypt

Để cài đặt mô -đun PHP McRypt, trước tiên chúng tôi cần đáp ứng các điều kiện tiên quyết sau:

sudo apt install php-dev libmcrypt-dev php-pear

Bây giờ chúng tôi đã sẵn sàng để cài đặt mô -đun PHP McRypt trên hệ thống Ubuntu 18.04 của chúng tôi:

$ sudo pecl channel-update pecl.php.net
$ sudo pecl install mcrypt-1.0.1

Mở tệp /etc/php/7.2/cli/php.ini và chèn:

extension=mcrypt.so

Tất cả đã được làm xong. Khi thành công, việc kiểm tra sự hiện diện của mô -đun PHP McRypt sẽ tạo ra đầu ra sau:

$ php -m | grep mcrypt
mcrypt

Đã trả lời ngày 17 tháng 1 năm 2019 lúc 6:24Jan 17, 2019 at 6:24

Hướng dẫn couldn t find any package by glob php7 4 mcrypt - không thể tìm thấy bất kỳ gói nào bằng freeship php7 4 mcrypt

Đã trả lời ngày 16 tháng 5 năm 2018 lúc 4:10May 16, 2018 at 4:10

HĐH: MacOS 11 (Big Sur)

Homebrew: 2.5.12

Phiên bản lê: 1.10.12

Tôi vừa nâng cấp PHP trên máy Mac của mình từ PHP7.1 lên PHP7.4 với homebrew (cài đặt bia).

Sau đó, khi tôi cố gắng cài đặt tiện ích mở rộng McRypt, tôi đã gặp lỗi:

configure: error: mcrypt.h not found. Please reinstall libmcrypt.
ERROR: `/private/tmp/pear/install/mcrypt/configure --with-php-config=/usr/local/homebrew/opt//bin/php-config --with-mcrypt' failed

Đây là những gì tôi đã làm:

  1. BREW ISNTALL MCRYPT
  2. Cài đặt PECL
  3. SUDO PECL Cài đặt McRypt - Lỗi đi vào đây.

Những gì tôi đã thử:

  1. Nằm ở McRypt.h và đặt thủ công tệp đến một số vị trí (dựa trên PHP-config), không hoạt động.

  2. Làm sạch bia và cài đặt lại/relink McRypt (libmcrypt), không hoạt động.

  3. Đã xóa các tệp mcrypt cũ của phiên bản bia cũ.

Đã hỏi ngày 1 tháng 12 năm 2020 lúc 7:47Dec 1, 2020 at 7:47

Zhangvzhangvzhangv

9001 Huy hiệu vàng8 Huy hiệu bạc21 Huy hiệu đồng1 gold badge8 silver badges21 bronze badges

2

Tôi gặp phải vấn đề tương tự. Vì vậy, sau khi cài đặt libmcrypt với

# Install prerequisites
sudo apt-get install php-dev libmcrypt-dev gcc make autoconf libc-dev pkg-config

# Compile mcrypt extension
sudo pecl install mcrypt-1.0.1
# Just press enter when it asks about libmcrypt prefix

# Enable extension for apache
echo "extension=mcrypt.so" | sudo tee -a /etc/php/7.2/apache2/conf.d/mcrypt.ini

# Restart apache
sudo service apache2 restart
4, có vẻ như cấu hình không thể tự động giải quyết đường dẫn đến mcrypt.h. Nó cũng không hoạt động để chỉ định CPPFLAGS hoặc cung cấp cho homebrew bao gồm đường dẫn.

Nhưng tôi đã tìm thấy một giải pháp phù hợp với tôi bằng cách đưa PECL vị trí cài đặt của McRypt trong hầm rượu homebrew. Đây là những gì mã sau tự động thực hiện:

# Install prerequisites
sudo apt-get install php-dev libmcrypt-dev gcc make autoconf libc-dev pkg-config

# Compile mcrypt extension
sudo pecl install mcrypt-1.0.1
# Just press enter when it asks about libmcrypt prefix

# Enable extension for apache
echo "extension=mcrypt.so" | sudo tee -a /etc/php/7.2/apache2/conf.d/mcrypt.ini

# Restart apache
sudo service apache2 restart
5

Đã trả lời ngày 30 tháng 5 năm 2021 lúc 12:50May 30, 2021 at 12:50

Hướng dẫn couldn t find any package by glob php7 4 mcrypt - không thể tìm thấy bất kỳ gói nào bằng freeship php7 4 mcrypt

OderwatoderwatOderWat

5.1213 Huy hiệu vàng25 Huy hiệu bạc29 Huy hiệu đồng3 gold badges25 silver badges29 bronze badges

2

Vấn đề ở đây là lệnh cấu hình không thể tìm thấy libmcrypt được cài đặt bởi homebrew

Bạn có thể

  1. Tải xuống mã nguồn của McRypt-1.0.4, sau đó CD trong thư mục

  2. Chạy "PHPize"

  3. Chạy "./configure--with-mcrypt =/opt/homebrew/cellar/mcrypt/2.6.8", bạn có thể thay đổi đường dẫn ở đây bằng đường dẫn của bạn cho lib homebrew lib

  4. Chạy "Make && Make Install"

  5. Thêm tiện ích mở rộng = mcrypt.so vào tệp cấu hình của bạn

PS: Sử dụng

# Install prerequisites
sudo apt-get install php-dev libmcrypt-dev gcc make autoconf libc-dev pkg-config

# Compile mcrypt extension
sudo pecl install mcrypt-1.0.1
# Just press enter when it asks about libmcrypt prefix

# Enable extension for apache
echo "extension=mcrypt.so" | sudo tee -a /etc/php/7.2/apache2/conf.d/mcrypt.ini

# Restart apache
sudo service apache2 restart
6 để xác định vị trí của tệp cấu hình PHP của bạn

Đã trả lời ngày 9 tháng 4 năm 2021 lúc 19:55Apr 9, 2021 at 19:55

Hướng dẫn couldn t find any package by glob php7 4 mcrypt - không thể tìm thấy bất kỳ gói nào bằng freeship php7 4 mcrypt

0

Trong trường hợp lỗi trên macOS, hãy sử dụng đường dẫn hoàn chỉnh trong php.ini như:macOS use the complete path in php.ini like:

# Install prerequisites
sudo apt-get install php-dev libmcrypt-dev gcc make autoconf libc-dev pkg-config

# Compile mcrypt extension
sudo pecl install mcrypt-1.0.1
# Just press enter when it asks about libmcrypt prefix

# Enable extension for apache
echo "extension=mcrypt.so" | sudo tee -a /etc/php/7.2/apache2/conf.d/mcrypt.ini

# Restart apache
sudo service apache2 restart
0

Đã trả lời ngày 29 tháng 8 lúc 9:10Aug 29 at 9:10

Hướng dẫn couldn t find any package by glob php7 4 mcrypt - không thể tìm thấy bất kỳ gói nào bằng freeship php7 4 mcrypt

Làm thế nào cài đặt McRypt trong Linux?

Answer..
Kết nối với máy chủ qua SSH ..
Cài đặt các phụ thuộc cần thiết: Trên Rhel, Centos và Cloudlinux: ....
Xây dựng phần mở rộng McRypt: ....
Bật tiện ích mở rộng trong cấu hình PHP: ....
Làm mới thông tin về các mô -đun PHP đã cài đặt. ....
Để áp dụng các thay đổi tải lại Apache máy chủ web (hoặc nginx nếu Apache không được sử dụng) và dịch vụ PHP-FPM:.

Làm cách nào để kích hoạt PHP McRypt?

Bạn có thể cài đặt McRypt từ cây nguồn PHP dưới dạng mô -đun nếu bạn chọn. Bật mô -đun bằng cách thêm: 'Extension = mcrypt.so' vào php.ini. Xong!adding: 'extension=mcrypt.so' to PHP. ini. Done!

Làm thế nào để tôi biết nếu McRypt được cài đặt?

Bạn cũng có thể đạt được cùng một màn hình này bằng cách xem một tệp PHP có: phpinfo ();Ở đâu đó trong mã. Trong màn hình này, chỉ cần tìm kiếm chuỗi "hỗ trợ McRypt" .if Đã cài đặt, bạn sẽ thấy một hộp có nội dung "Đã bật".phpinfo(); somewhere in the code. In this screen, simply search for the string "mcrypt support". If installed, you will see a box that says "enabled".

Làm cách nào để kích hoạt tiện ích mở rộng PHP của McRypt trong cPanel?

Procedure..
Cài đặt tiện ích mở rộng LibMCrypt: Yum Cài đặt LibMCrypt ..
Cài đặt kho lưu trữ EPEL: YUM Cài đặt phát hành EPEL ..
Cài đặt gói libmcrypt-devel từ kho lưu trữ epel: YUM cài đặt libmcrypt-devel ..
Cài đặt McRypt qua PECL:/OPT/CPANEL/EA-PHP72/ROOT/USR/BIN/PECL Cài đặt McRypt ..