Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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/
share|improve this question

migrated from stackoverflow.com Dec 15 '12 at 19:35

This question came from our site for professional and enthusiast programmers.

2  
Possible duplicate: How to install PHP mbstring on CentOS 6.2 –  cbuckley Dec 15 '12 at 18:46
    
hey cbuckley,, in that question it provides baseurl=centos.intergenia.de/$releasever/updates/$basearch but it dont work for me –  Suraj Kumar Dec 15 '12 at 19:09

1 Answer 1

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 yum simplified 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
share|improve this answer
    
where sould i use # wget rpmfind.net/linux/centos/6.3/os/i386/Packages/… –  Suraj Kumar Dec 15 '12 at 19:10

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.