I am currently having a technical problem getting started with CS50 pset8. I intiailly had problems in the CS50 IDE window when I tried to import the file US.txt in to the MySQL phpMyAdmin database places but when I tried I got an error message showing:

Fatal error: CS50 Library requires bcmath or gmp extension module in /home/ubuntu/workspace/pset8/vendor/library50-php-5/CS50/CS50.php on line 48

Somehow after looking for solutions on CS50 Stack Exchange and asking for help. I seem to have eliminated this error message by downloading the bcmath and gmp extension modules using:

sudo add-apt-repository ppa: ondrej/php

sudo apt-get update

sudo apt install php-bcmath

However, when I tried running ./import US.txt again from the IDE command line I've now ended up with the following error message:

PHP Fatal error:  could not find driver in /home/ubuntu/workspace/pset8/vendor/library50-php-5/CS50/CS50.php on line 313

I am unable to proceed with problem set 8 until this is resolved. Could someone please point me in the right direction to help me resolve this problem?

1 Answer 1


The correct command to install php-bcmath should read:

sudo apt-get install php-bcmath

Try that and let me know if it helps.

Also, I'm not sure how you managed to finish pset7 without the CS50 Library.

  • I had the CS50 library for pset7 but somehow I think it may have been corrupted when I used update50 before downloading the files for pset8. In anycase, I tried stalling bcmath again and I got a message saying that I already have the latest version installed. I still have not found a way around the CS50 library driver error yet. Oct 30, 2016 at 15:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .