$ sudo apt install apache2 libapache2-mod-php openssl php-imagick php-gd php-imap php-intl php-json php-ldap php-mbstring php-mysql php-pgsql php-smbclient php-ssh2 php-sqlite3 php-xml php-zipReading package lists... Done
Building dependency tree
Reading state information... Done
Package php-smbclient 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-smbclient' has no installation candidate 1 Answer
The php-smbclient package is only available in the 18.04 Universe repository, so cannot be installed on 21.04 without adding a 3rd-party repo, such as the ondrej PPA.
You can add this to your system like so:
sudo add-apt-repository ppa:ondrej/php
sudo apt updateFrom here you will be able to install the php-smbclient package.