Reputation: 37
I recently installed Ubuntu and I want to start coding in C and C++.
I have gdb and gcc files on my desktop.
I am getting this error while trying to install the above:
soumya@soumya-VirtualBox:~/Desktop$ sudo dpkg -i libstdc++6-4.7-dev_4.7.3-1ubuntu1_amd64
[sudo] password for soumya:
dpkg-split: error: error reading libstdc++6-4.7-dev_4.7.3-1ubuntu1_amd64: Is a directory
dpkg: error processing archive libstdc++6-4.7-dev_4.7.3-1ubuntu1_amd64 (--install):
subprocess dpkg-split returned error exit status 2
Errors were encountered while processing:
libstdc++6-4.7-dev_4.7.3-1ubuntu1_amd64
I have all the files on the desktop. What should I do?
Upvotes: 1
Views: 2507
Reputation: 9810
In the message, we clearly see that libstdc++6-4.7-dev_4.7.3-1ubuntu1_amd64 is a directory and not a file in your case.
So you have to provide a file.
To answer your question, when I installed Ubuntu for the first time, I found the gcc already installed
I just typed gcc -v and i got:
gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04)
If for any reason you don't have access to gcc and in order to install it in ubuntu, you will need the build-essential package.
Build-essential contains a list of packages which are essential for building Ubuntu packages including gcc compiler, make and other required tools.
Just go like this:
$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get install build-essential
Look at this page you will get instructions to install gcc.
After doing so, you will have access to gcc and g++ compilers
Upvotes: 1