Home  >  Article  >  Backend Development  >  How to Install PHP Mbstring on CentOS 6.2 When Yum Install Fails?

How to Install PHP Mbstring on CentOS 6.2 When Yum Install Fails?

Susan Sarandon
Susan SarandonOriginal
2024-10-18 16:28:29541browse

How to Install PHP Mbstring on CentOS 6.2 When Yum Install Fails?

Installing PHP mbstring on CentOS 6.2

Unable to install PHP mbstring using yum install php-mbstring? This guide resolves the issue by modifying the YUM repository configuration.

Solution

Follow these steps:

  1. Edit the CentOS-Base repository file:
<code class="bash">sudo nano /etc/yum.repos.d/CentOS-Base.repo</code>
  1. In the updates section, comment out the mirrorlist line by adding a # at the beginning.
  2. Add a new line below the commented-out line:
<code class="bash">baseurl=http://centos.intergenia.de/$releasever/updates/$basearch/</code>
  1. Update the YUM cache and install mbstring:
<code class="bash">yum install php-mbstring</code>
  1. (Optional) Revert the repository configuration changes:
  • Uncomment the mirrorlist line.
  • Comment out the baseurl line.

The above is the detailed content of How to Install PHP Mbstring on CentOS 6.2 When Yum Install Fails?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn