PHP: Installing mbstring - package unavailable

General Tech Bugs & Fixes 3 years ago

1.09K 2 0 0 0

User submissions are the sole responsibility of contributors, with TuteeHUB disclaiming liability for accuracy, copyrights, or consequences of use; content is for informational purposes only and not professional advice.

Answers (2)

Post Answer
profilepic.png
manpreet Tuteehub forum best answer Best Answer 3 years ago

I want to install mbstring in PHP. I used these commands in ssh:

sudo yum install php-mbstring

I tried all the below repository, but I always get:

No package php-mbstring available.

sudo nano /etc/yum.repos.d/CentOS-Base.repo

mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
baseurl=http://centos.intergenia.de/$releasever/updates/$basearch/
baseurl=http://dev.centos.org/centos/$releasever/testing/$basearch/
0 views
0 shares

profilepic.png
manpreet 3 years ago

Open up a terminal (# - 'shorthand' for terminal) and run these commands:

# cd ~
# wget ftp://rpmfind.net/linux/centos/6.3/os/i386/Packages/php-mbstring-5.3.3-3.el6_2.8.i686.rpm
# rpm –ivh php-mbstring-5.3.3-3.el6_2.8.i686.rpm

or use ftp://rpmfind.net/linux/centos/6.3/os/x86_64/Packages/php-mbstring-5.3.3-3.el6_2.8.x86_64.rpm for 64-bit, depending on your system.

If you use a desktop interface (most likely), you can just double click on the .rpm file in the file browser to install, instead of using terminal. This is kind of the 'old' way to install things. Before yumsimplified things.

Please note that you need to run as root. The best way to do so is to type sudo before each command. Example:

sudo rpm –ivh php-mbstring-5.3.3-3.el6_2.8.i686.rpm

0 views   0 shares

No matter what stage you're at in your education or career, TuteeHUB will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.

Similar Forum