def _install(self, packages, update=False, check=True, **kwargs):
    if update:
        self.update()
    if check:
        packages = self.check(packages)
    if ((self._mode == self.mode_check) and packages):
        raise ConanException("System requirements: '{0}' are missing but can't install because tools.system.package_manager:mode is '{1}'.Please update packages manually or set 'tools.system.package_manager:mode' to '{2}' in the [conf] section of the profile, or in the command line using '-c tools.system.package_manager:mode={2}'".format(', '.join(packages), self.mode_check, self.mode_install))
    elif packages:
        packages_arch = [self.get_package_name(package) for package in packages]
        if packages_arch:
            command = self.install_command.format(sudo=self.sudo_str, tool=self.tool_name, packages=' '.join(packages_arch), **kwargs)
            return self._conanfile.run(command)
    else:
        self._conanfile.output.info('System requirements: {} already installed'.format(' '.join(packages)))
def _install(self, packages, update=False, check=True, **kwargs):
    if update:
        self.update()
    if check:
        packages = self.check(packages)
    if ((self._mode == self.mode_check) and packages):
        raise ConanException("System requirements: '{0}' are missing but can't install because tools.system.package_manager:mode is '{1}'.Please update packages manually or set 'tools.system.package_manager:mode' to '{2}' in the [conf] section of the profile, or in the command line using '-c tools.system.package_manager:mode={2}'".format(', '.join(packages), self.mode_check, self.mode_install))
    elif packages:
        packages_arch = [self.get_package_name(package) for package in packages]
        if packages_arch:
            command = self.install_command.format(sudo=self.sudo_str, tool=self.tool_name, packages=' '.join(packages_arch), **kwargs)
            return self._conanfile.run(command)
    else:
        self._conanfile.output.info('System requirements: {} already installed'.format(' '.join(packages)))