I am not able to install curl package on ubuntu 11.10 - javascript

I am trying to install meteor using : curl https://install.meteor.com | /bin/sh
command on terminal but it gives me following error:
The program 'curl' is currently not installed. You can install it by typing:
sudo apt-get install curl
And when I tried installing curl by command : sudo apt-get install curl
Following error is shown to me:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package curl is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'curl' has no installation candidate
Can anyone please tell me how to resolve this issue.

See this post on askubuntu.
sudo sed -i -e 's/us.archive.ubuntu.com/archive.ubuntu.com/g' /etc/apt/sources.list
sudo apt-get update
sudo apt-get install curl

hook up to the best server from the software & updates section
then
sudo apt-get update
sudo apt-get install curl

Related

I can't upgrade nodejs version from 10.24.0 to 14.16.1(LTS) on Raspberry Pi Desktop

I installed Raspberry Pi Desktop on an old laptop and then I installed nodejs using 'sudo apt install nodejs'. After that, when I verify the version of node, using 'node -v' or 'nodejs -v' I get 'v10.24.0'.
Then I try upgrade the Nodejs version but it doesn't work because whatever way I used to upgrade, the version stays the same.
I try this:
pi#local-server-raspi:~ $ sudo su -
root#local-server-raspi:~ # apt-get remove nodered -y
root#local-server-raspi:~ # apt-get remove nodejs nodejs-legacy -y
root#local-server-raspi:~ # apt-get remove npm -y
root#local-server-raspi:~ # curl -sL https://deb.nodesource.com/setup_14.x | sudo bash -
root#local-server-raspi:~ # apt-get install nodejs -y
root#local-server-raspi:~ # node -v
v10.24.0
root#local-server-raspi:~ # npm -v
bash: npm: command not found
I also try with nvm but with the same result, when I type 'nodejs -v' I get 'no such file or directory' and when I type 'node -v' I get the same version, 10.24.0.
I appreciate it if any of you have some idea how to upgrade the version of the nodejs to the LTS version, 14.16.1.
I had the same problem while trying to install nodejs to the raspberrypi 4. I needed a newer version to run yarn. There are many tutorials but this instruction video (below) fixed my problem and upgraded the nodejs to 14.16.1. (Thanks Dave!!!)
thisdavej.com/upgrading-to-more-recent-versions-of-node-js-on-the-raspberry-pi/
I had the same problem on Raspberry Pi3. I tried all sorts of things and this is what finally worked...
node -v
v10.24.0
# Remove...
sudo apt remove node
sudo apt remove nodejs
# Install...
sudo curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
sudo apt-get install -y nodejs
# Check
node -v && npm -v
v14.19.3
6.14.17

How can I install nodemon on windows 10?

I am using the bash console in windows 10. I am using node.js and I want to install nodemon, but I get this:
sudo: npm: command not found
and I'm supposed to have npm
Providing information about how you installed npm could be useful. Assuming you used windows and not bash to install npm, that is probably why you might be having an issue.
Try installing node through bash console.
Install git first
apt-get install git
Get the latest version of node
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
Install node
sudo apt-get install -y nodejs
if it still doesn't work SOMETIMES node will get installed as nodeJS so you might have to create a hard link
ln -s `which nodejs` /usr/bin/node

Uninstall php 7 in ubuntu 18.04

I have a server that has an application that runs with PHP 5.6. But I upgraded the server from Ubuntu 14.04 to 18.04 and in the process I also upgraded PHP to 7.2.
Now I'm trying to uninstall it but I'm finding difficult.
I have run the command:
sudo apt-get remove php
and
sudo apt-get remove --purge php
Its says that PHP it's not installed, but running
php --version
I'm still seeing the version 7 of PHP.
PHP 7.2.19-0ubuntu0.18.04.2 (cli) (built: Aug 12 2019 19:34:28) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.2.19-0ubuntu0.18.04.2, Copyright (c) 1999-2018, by Zend Technologies
This will remove all php7 versions, be it php 7.0 or php 7.1 etc..
sudo apt-get purge php7.*
sudo apt-get autoclean
sudo apt-get autoremove
apt/apt-get autoclean → cleans obsolete deb-packages, less than clean
apt/apt-get autoremove → removes orphaned packages which are not longer needed from the system, but not purges them, use the --purge option together with the command for that.
**To Install PHP again **
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
if php7.0
sudo apt-get install php7.0
if php7.1
sudo apt-get install php7.1
if php7.2
sudo apt-get install php7.2
To switch that to the newer 7.1,7.2,7.3,7.4 version, first disable older PHP version:
user#test:~# sudo a2dismod php7.0
Then enable PHP 7.2:
user#test:~# sudo a2enmod php7.2
sudo service apache2 restart
Install all the required extension, so it won't make any error in future.
Replace command based on your version. I used 7.2 as I have installed that version.
sudo apt install php7.2-common php7.2-mysql php7.2-xml php7.2-xmlrpc php7.2-curl php7.2-gd php7.2-imagick php7.2-cli php7.2-dev php7.2-imap php7.2-mbstring php7.2-opcache php7.2-soap php7.2-zip php7.2-intl -y
Firstly you need to restart the apache to take all in effect and also
You can install mutliple php version using this post
or just using
sudo apt update
sudo apt-add-repository ppa:ondrej/php
sudo apt update
sudo apt install -y php5.6 php5.6-cli php5.6-common
disable php7.2:
sudo a2dismod php7.2
enable php 5.6:
sudo a2enmod php5.6
After all restart the apache again to take into affect
service apache2 restart
This will remove PHP
sudo apt-get purge `dpkg -l | grep php7.2| awk '{print $2}' |tr "\n" " "`
sudo apt-get purge php7.*
sudo apt-get autoremove --purge
whereis php
sudo rm -rf /etc/php
To uninstall PHP
sudo apt-get remove –purge php*
sudo apt-get purge php*
sudo apt-get autoremove
sudo apt-get autoclean
sudo apt-get remove dbconfig-php
sudo apt-get dist-upgrade
The output of the below command will provide you with information on the installed package software, version, architecture, and a short description of the package. grep command is used to find the PHP package
sudo dpkg --get-selections | grep php | cut -f 1
sudo apt-get remove --purge
sudo whereis php
sudo rm -rf <directory/file path from the previous command output>
Just run
sudo apt-get purge 'php*'
apt-mark to the rescue
I think it is a good idea to point out the existence of apt-mark hold <package-name>.
Once you have a specific version installed that you want to keep, you can prevent accidental upgrades. So you can run apt upgrade, apt full-upgrade and don't need to worry about which PHP version you will end up with.
That said, you also prevent scenarios (as seen with the commenters above) where you end up with multiple major and main releases installed next to each other at the same time.
For example, if you have PHP 7.4 installed, and your App doesn't support PHP 8.* yet, then:
apt-mark hold php7.4-common
apt-mark hold php7.4-fpm
This is work on my server:
sudo apt purge php5.6 php5.6-common
sudo apt purge php7.x php7.x-common

how to install meteor on Ubuntu?

I want to run meteor application in ubuntu. I run following command to install curl.
sudo apt-get install curl
But it gives me following errors:
$sudo apt-get install curl
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package curl is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'curl' has no installation candidate
please help me to install curl and meteor.
sudo apt-get update
And you might want to consider using this command:
sudo apt-get install libcurl3 php5-curl
Then, to make it easier just use the command wget -qO- https://install.meteor.com | sh. Curl was used on earlier versions of ubuntu. It is not really an essential tool, but some tutorials use it indeed.

Getting error while running simple javascript using node framework

As I run this piece of code using node a.js:
var sys = require('sys');
sys.puts('Hello, World');
I'm getting the following as an error
axconfig: port 1 not active
axconfig: port 2 not active
Warning: This is old but it might still work.
You didn't install node.js but the package node (that contains some other unrelated software) for your linux distro.
You can install node.js three ways: Using git, downloading the version file, or installing through the package manager, I recommend using the package manager for ease-of-use and the ability to easily update.
Package Manager
Check out Installing Node.js via Package Manager. It has instructions on how to install using the package manager of your preference.
Direct Download
Go the the downloads page of node.js and download the package for your OS. Don't forget that, doing i this way, doesn't auto-update node.js later on!
Source Compilation / git
First you need git and a compiler, here is how you install them on debian/ubuntu (this depends on your package manager):
sudo apt-get install git-core build-essential
(If you don't want to use git, you can download the source code from the website. You still need build-essential or equivalent for your OS.)
Then go to a folder where the "node" repository will be placed, something like ~/projects or ~/src is good enough, and do this:
git clone https://github.com/joyent/node.git
Then enter the node directory, configure it and build it.
cd node && ./configure && make
Everything should go well. Before installing node you can optionally run the tests to check for any problems:
make test
You can finally install node, this allows you to run the node command anywhere in the system and the javascript libraries to be installed.
make install
...and we are done.
You can test those lines of code using node-repl (node's REPL, think "interactive interpreter"), just type node-repl, quit with Ctrl+D.
axconfig: port 1 not active
axconfig: port 2 not active
this problem no where related to nodejs.
Do not install node using the command sudo apt-get install node, This will install radio package(node). this radio package requires axports to be active, which is not linked with nodejs
So uninstall node from sudo apt-get remove node
Manually Download nodejs from Here or from GitHub but make sure you install the stable branch(0.4.x).Unpack the nodejs.
For installing please follow the README.md
After installing then set the environment variables echo PATH=$PATH:/home/user/pathtonode/
you installed node, you want the package called nodejs
If you are on ubuntu, follow:
sudo apt-get update
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs
You need to install nodejs and not node!
Brandon Helwig is correct. It just happened to me. In general, if you get this type of error, you have installed the wrong package. Here are more instructions for you to install one of the latest versions of Node.js.
Fix
sudo apt-get remove node
This will remove the accidentally installed package. Both names for the package node and nodejs are the same which is node.
If you do sudo apt-get install node, what you would get is a old version. But thanks for Chris Lea, we got a PPA for this task.
sudo apt-get update
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs
This should get you the latest version of Node.js in your application.
If you are in need of an bleeding edge version, you can install from the source. But I think this is way cleaner.
This problem is occur in ubuntu,so I resolved this problem by git. Clone this new source from github
and do following actions:
Uninstall node
sudo apt-get remove --pure node
sudo apt-get clean
Make install node
git clone https://github.com/joyent/node.git
cd node
./configure
make
make install
Then this will be work well.
If Node.js installation as suggested by ninja works for you (like on AWS Ubuntu):
sudo apt-get update
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs
you might still want to add node to your system path like this:
export PATH=/usr/bin/:$PATH
so you can type
node webapp.js
instead of
/usr/bin/node webapp.js
Find your node installation path simply by typing
which node
The easiest way is to remove the node installation first and then install npm.
npm is the Node Package Manager, this will automatically install nodejs itself

Categories

Resources