Software⏱️ 4 min read📅 2026-06-11

How to Fix: Package installed, but with error

Error fixing package installation issue with Puppet Enterprise on CentOS 6.5.

Quick Answer: Check the package name and ensure it matches exactly, as case sensitivity may cause issues.

The error 'Could not find package vim' occurs when Puppet is unable to locate the Vim package, despite its presence on the system. This issue affects users who are using CentOS 6.5 with Puppet Enterprise 3.1.1 and have a manifest containing the `package { vim: ensure => present }` declaration.

This error can be frustrating because it implies that Vim is not installed or cannot be found, even though it is actually present on the system. The goal of this troubleshooting guide is to help resolve this issue and understand why Puppet is unable to find the package.

💡 Why You Are Getting This Error

  • The primary reason for this error is that the `ensure` parameter in the Puppet manifest is set to `present`, which requires Vim to be installed on the system. However, if Vim is present but not installed (e.g., as a source file or a symbolic link), Puppet will still report an error.
  • Another possible cause is that the package manager used by CentOS 6.5 (RPM) is unable to find the Vim package due to issues with the package index or repository configuration.

🔧 Proven Troubleshooting Steps

Verify Package Manager Configuration

  1. Step 1: Check the package index and repository configuration on the system using tools like `rpm --queryformat '%{NAME}' | grep vim` or `yum repolist`. Ensure that the Vim package is listed and can be found by the package manager.
  2. Step 2: Verify that the Vim package is installed and not just present as a source file or symbolic link. Use commands like `ls -l /usr/bin/vim` to check if the executable exists in the expected location.
  3. Step 3: If the package index or repository configuration is incorrect, update the package list using `yum update` or `rpm --rebuild` and then retry installing Vim using `package { vim: ensure => present }`.

Use a Different Package Manager

  1. Step 1: Try installing Vim using the `apt-get` package manager instead of RPM. This can be done by adding the following line to the Puppet manifest: `package { vim: ensure => present, provider => 'apt' }`. However, this may not work if other packages depend on Vim.
  2. Step 2: If using `apt-get` is not an option, you can try installing Vim manually using `sudo yum install vim` and then update the Puppet manifest to use the `ensure` parameter correctly.

💡 Conclusion

To resolve the 'Package installed, but with error' issue, first verify that the package manager configuration is correct and the Vim package is installed. If issues persist, try using a different package manager or manually installing Vim. By following these steps, you should be able to successfully install Vim using Puppet Enterprise 3.1.1 on CentOS 6.5.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions