I can’t install C++ extension for Visual studio code. When I try to install it I get message of error:
Error while installing 'C/C++' extension. Please check the log for more details.
And when I checked logs to had seen next message:
2023-06-29 14:03:55.273 [error] Download: net::ERR_NETWORK_CHANGED
at gt.download (/usr/share/code/resources/app/out/vs/code/node/sharedProcess/sharedProcessMain.js:81:160122)
at async j.y (/usr/share/code/resources/app/out/vs/code/node/sharedProcess/sharedProcessMain.js:82:20937)
at async j.h (/usr/share/code/resources/app/out/vs/code/node/sharedProcess/sharedProcessMain.js:82:19006)
2023-06-29 14:03:55.310 [error] net::ERR_NETWORK_CHANGED: Download: net::ERR_NETWORK_CHANGED
at gt.download (/usr/share/code/resources/app/out/vs/code/node/sharedProcess/sharedProcessMain.js:81:160122)
at async j.y (/usr/share/code/resources/app/out/vs/code/node/sharedProcess/sharedProcessMain.js:82:20937)
at async j.h (/usr/share/code/resources/app/out/vs/code/node/sharedProcess/sharedProcessMain.js:82:19006)
My OS is Ubuntu 22.04.
How can I install C++ extension?
I tried reinstalling VS Code but it didn’t work.
2
Answers
Ensure GCC is installed
Although you’ll use VS Code to edit your source code, you’ll compile the source code on Linux using the g++ compiler. You’ll also use GDB to debug. These tools are not installed by default on Ubuntu, so you have to install them. Fortunately, that’s easy.
First, check to see whether GCC is already installed. To verify whether it is, open a Terminal window and enter the following command:
I have the same OS (Ubuntu 22.04). I just check out, and I have installed the C++ extension for VS Code. Furthermore, I ran a simple helloworld.cpp, and I have the following:
And the log
Try seeing if you have gcc installed using the terminal gcc –version