0

I tried to install npm in my ubuntu 18.04 using apt-get, my thrown some errors called,

npm: depends: node-gyp (>= 0.10.9) but it is not going to be installed.

I found one solution that says install aptitude first the install npm using

sudo aptitude install npm

And then the npm installed successfully, but i cannot do any apt operations.

Please help me to fix this.

Thanks in advance.

Satya
  • 181

2 Answers2

0

As you are working on the Ubuntu 18.04, By default It will have the apt-get Installed. if this Command is not found means the Installation of Ubuntu is not Proper. Please have a check with it.

Follow this Link.

  • 1
    It was working fine earlier. After I installed the Aptitude, the apt-get not working – Satya Feb 01 '19 at 05:57
  • Aptitude is also a package Manager, So Instead of using apt-get, you use aptitude. Find More details of aptitude Here: https://wiki.debian.org/Aptitude. – Sunil Valmiki Feb 01 '19 at 06:03
-1

As the @Sunil Valmiki said, Aptitude is also a package manager and has pros and cons. You can continue to use aptitude if that is ok for you. As your apt-get problem, there is no way i can think of to repair apt-get. Apt-get is a part of the installation, the operating system. When you tried to solve your npm problem you may have caused some conflict between aptitude and apt-get that you haven't notice. You may need to install ubuntu again.

Ugur Akgul
  • 64
  • 4