0
aanchal@aanchal-Inspiron-3542:~$ sudo apt-get install libmysqlc++-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package libmysqlc++-dev
E: Couldn't find any package by regex 'libmysqlc++-dev'

'universe'options is enabled in the software center.

well thanks everyone i typed the command wrong.it was installed successfully. and i tried running the program test.cpp:

#include <iostream>
#include <mysql.h>
using namespace std;
MYSQL *connection, mysql;
MYSQL_RES *result;
MYSQL_ROW row;
int query_state;
int main() {
return 0;
}

using the command:

g++ -o test test.cpp -L/usr/include/mysql -lmysqlclient -I/usr/include/mysql

it didnt give me any error message. so does that mean everything's working fine?

3 Answers 3

4

There is no package named libmysqlc++-dev in Ubuntu.

If you want the development files for the MySQL C++ library bindings install the package libmysql++-dev (without the c).

1

You are adding an unwanted c in libmysqlc++-dev. It should be libmysql++-dev.

sudo aptitude show libmysql++-dev 
Package: libmysql++-dev                  
State: not installed
Version: 3.2.1+pristine-1
Priority: optional
Section: universe/libdevel
Maintainer: Ubuntu Developers <[email protected]>
Architecture: i386
Uncompressed Size: 2,350 k
Depends: libmysql++3 (= 3.2.1+pristine-1), libmysqlclient-dev
Suggests: libmysql++-doc
Description: MySQL C++ library bindings (development)
 MySQL++ is a complex C++ API for MySQL (and other SQL databases soon). The goal of this API is to make working with Queries as easy as
 working with other STL containers. 

Install libmysql++-dev with

sudo apt-get install libmysql++-dev

0
0

The package is libmysql++-dev, without the c.

If you get the same error when installing the above, then you'll need to change your archive mirror:

  • Select one from here, making sure it's close to your location.

  • Enter gksudo gedit /etc/apt/sources.list into the terminal

  • Replace the current mirror with your newly-chosen one

The package should then install with no problems.

You must log in to answer this question.

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