How to install Qt.-5.0.2 on ubuntu 12.10? - linux

I've downloaded qt-linux-opensource-5.0.2-x86-offline.run and i cant install it on ubuntu.
this is all i have done.
$ cd /media/moslem/0EB40068B400549D/
$ chmod +x qt-linux-opensource-5.0.2-x86-offline.run
$ sudo ./qt-linux-opensource-5.0.2-x86-offline.run
[sudo] password for moslem:
sudo: ./qt-linux-opensource-5.0.2-x86-offline.run: command not found
please tell me how i can install it.

You can try sudo on all commands...

Related

gnome-terminal not opening after library installation. ERROR: FT_Get_Var_Design_Coordinates

I am using Ubuntu 20.04 and tried to install the Python version of Tecplot (Pytecplot), after which I'm unable to open the terminal anymore.
$ gnome-terminal
/usr/bin/gnome-terminal.real: symbol lookup error: /lib/x86_64-linux-gnu/libcairo.so.2: undefined symbol: FT_Get_Var_Design_Coordinates
My Bash_history shows following commands:
python3 setup.py install
sudo python3 setup.py install
sudo apt-get install libjpeg62:i386
sudo apt update sudo apt install libpng12-0
sudo cp libjpeg.so.62 ../
sudo cp libjpeg.so.62 ../../local/lib/
sudo dpkg -i libpng12-0_1.2.54-1ubuntu1.1_amd64.deb
I made a backup of usr/local/lib before starting, but restoring that backup did not solve the problem.
Can someone help me in solving the above issue?

sudo throw error cannot execute binary file exec format error

I made a mistake while trying to install Rstudio in a debian with this command:
sudo gdebi rstudio-server-1.2.5033-amd64.deb
and now if I try to use sudo again, I ve got this message :
sudo apt-get update:
bash: /usr/bin/sudo : cannot execute binary file:
Exec format error
How can I reverse this error ?
Thanks
Ok so I manage to fix it, here is what I've done,
login to root with su,
remove the alter version of sudo with: apt-get remove sudo:amd64
reinstall the correct version: apt-get install sudo
exit root mode and try it gain, now it works.
thanks

Installation nvm in Ubuntu 14.04

I have to install nvm on Ubuntu 14.04 for a work and this is the guide that I have to follow:
Installation of nvm globally
sudo git clone https://github.com/creationix/nvm.git /opt/nvm
sudo mkdir /usr/local/nvm
sudo addgroup -system dev
sudo chown -R root:dev /usr/local/nvm
sudo chmod -R 775 /usr/local/nvm
sudo vim /etc/profile.d/nvm.sh
Installation of node v 4.x
sudo mkdir /usr/local/node
sudo chown -R root:dev /usr/local/node
sudo chmod -R 775 /usr/local/node
nvm stable
The problems are that in the passage 6 I don't know exactly what to do or write in the file nvm.sh and then the last command tells me "nvm: command not found"
you should add to nvm.sh the following content:
export NVM_DIR=/usr/local/nvm
source /opt/nvm/nvm.sh
export NPM_CONFIG_PREFIX=/usr/local/node
export PATH="/usr/local/node/bin:$PATH"
refer also to this answer

Not able to install youtube-dl

I have tried almost everything I could find on google but could not install youtube-dl on Debian Mint.
Try 1
Installed and updated with following commands:
sudo apt-get install youtube-dl
sudo youtube-dl -U
But when tried
youtube-dl http://www.youtube.com/watch?v=dwYatpwrs8s
Then I got
Hi! We changed distribution method and now youtube-dl needs to update itself one more time.
This will only happen once. Simply press enter to go on. Sorry for the trouble!
From now on, get the binaries from http://rg3.github.io/youtube-dl/download.html, not from the git repository.
Then I went to http://rg3.github.io/youtube-dl/download.html and followed the installation instructions:
Try 2
sudo wget http://youtube-dl.org/downloads/2013.05.23/youtube-dl -O /usr/local/bin/youtube-dl
sudo chmod a+x /usr/local/bin/youtube-dl
Got the same error about the distribution change and new link.
Try 3
So I installed pip on my debian first and ran
sudo pip install --upgrade youtube_dl
But I am still getting same error and I have no idea what to do about it.
Just re-execute sudo youtube-dl -U and press Enter to update to the latest version. With your second try, you installed it a second time (to /usr/local/bin/ instead of /usr/bin) - you want only one.
Alternatively, simply uninstall youtube-dl with sudo apt-get remove -y youtube-dl. That should make the local version (/usr/local/bin/youtube-dl) the first one in your PATH again - if your PATH contains /usr/local/bin. If it doesn't, you can also just install youtube-dl to /usr/bin, with the following commands:
sudo wget https://yt-dl.org/latest/youtube-dl -O /usr/bin/youtube-dl
sudo chmod a+x /usr/bin/youtube-dl
If you already install remove it:
sudo rm /usr/bin/youtube-dl
sudo apt-get remove -y youtube-dl
Try the following command
sudo wget https://yt-dl.org/latest/youtube-dl -O /usr/local/bin/youtube-dl
sudo chmod a+x /usr/local/bin/youtube-dl
hash -r
I solved the issue with this:
https://github.com/ytdl-org/youtube-dl/issues/3908
Use the following commands to update:
sudo rm /usr/bin/youtube-dl # or apt-get remove -y youtube-dl
sudo wget https://yt-dl.org/latest/youtube-dl -O /usr/local/bin/youtube-dl
sudo chmod a+x /usr/local/bin/youtube-dl

On EC2: sudo node command not found, but node without sudo is ok

I have just installed nodejs on a new EC2 micro instance.
I installed it normally, ./configure -> make -> sudo make install.
Problem: When I run "node" under ec2-user, it runs perfectly. When I run "sudo node", it fails.
I found out that node is in:
[ec2-user#XXXX ~]$ whereis node
node: /usr/local/bin/node /usr/local/lib/node
and the current path is
[ec2-user#XXXX ~]$ echo $PATH
/usr/local/bin:/bin:/usr/bin:/opt/aws/bin:/home/ec2-user/bin
but, the sudo path is
[root#ip-10-112-222-32 ~]# echo $PATH
/usr/local/sbin:/sbin:/bin:/usr/sbin:/usr/bin:/opt/aws/bin:/root/bin
then I tried to edit the root PATH to include the paths to node, so "node" runs when I'm logged in as root - but it still won't work when I log in as ec2-user and run "sudo node".
I need this to install npm properfly. Any idea on how to include the node path while running "sudo node"?
Yes, it is a bit annoying but you can fix it with some links:
sudo ln -s /usr/local/bin/node /usr/bin/node
sudo ln -s /usr/local/lib/node /usr/lib/node
sudo ln -s /usr/local/bin/npm /usr/bin/npm
sudo ln -s /usr/local/bin/node-waf /usr/bin/node-waf
There might be more but that is all I have run across so far. Lack of node-waf will cause some npm installs to fail with a rather cryptic error message.
I added /usr/local/bin to secure_path in /etc/sudoers
$ sudo visudo
Then change this line:
Defaults secure_path = /sbin:/bin:/usr/sbin:/usr/bin
To:
Defaults secure_path = /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin
it happens because the node executable is not found in /usr/bin. So follow the steps:
find node:
whereis node
in my case: node: /home/<my_user>/.nvm/versions/node/v8.9.4/bin/node
make a symbolic link for node:
sudo ln -s /home/<my_user>/.nvm/versions/node/v8.9.4/bin/node /usr/bin/node
It's done!
Why not use the absolute path to node? If you planning to use an upstart script it is going to need an absolute path anyways.
sudo /usr/local/bin/node server.js
try the following:
export PATH=$PATH:/usr/local/bin
sudo node --version
You could pass full path to node executable from parent (non-sudo shell) using which command.
sudo `which node`
For me, it worked to just change ownership of node folder from root to ec2-user (logged in as ec2-user).
(Note: I created my node folder in /var/lib/)
sudo chown -R ec2-user /var/lib/node/
Then
npm install mongojs
should work fine (provided you have installed npm ok of course!)
How about using "sudo $(which node)" instead of "sudo node" ?
Here's an approach that doesn't use symlinks, or require root:
$ git clone https://github.com/joyent/node.git
$ cd node
$ mkdir ~/opt
$ export PREFIX=~/opt; ./configure
$ make
$ make install
$ echo 'export PATH=~/opt/bin:${PATH}' >> ~/.bashrc
Then I did:
$ git clone https://github.com/isaacs/npm.git
$ cd npm
$ make install
The benefits of not running node as root are discussed here:
http://increaseyourgeek.wordpress.com/2010/08/18/install-node-js-without-using-sudo/
Its inline with:
https://github.com/joyent/node/wiki/Installation
In my case, Node was installed without sudo prefix. So node was unavailable for the superuser that why it is not working sudo node server
Enter as root with
sudo su
and then do standard steps
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash
. ~/.nvm/nvm.sh
nvm install node
node -e "console.log('Running Node.js ' + process.version)"
This is what I did to solve a similar issue. Note: I had installed node via snap.
Step 1: Install node via snap
sudo snap install node --classic
Step 2: Find where node has been installed
whereis node
In my case
/snap/bin/node.npm
/snap/bin/node.npx
/snap/bin/node.yarn
/snap/bin/node
/snap/bin/node.yarnpkg
Step 3: Create symbolic links to node, npm, npx and yarn
sudo ln -s /snap/bin/yarn /usr/bin/yarn
sudo ln -s /snap/bin/node /usr/bin/node
sudo ln -s /snap/bin/npm /usr/bin/npm
Finally node is accessible for all users, even sudo group
sudo node
I tried everything mentioned in the above answers but nothing worked. Probably because of my lack of understanding of concepts related to sym links. I fixed the issue by not using nvm.
I just created a new ec2 instance and didn't install nvm. Instead I installed node and npm like so:
sudo apt update
sudo apt install nodejs npm
And this did it for me.
If you have installed node environment already, paste these command in you r instance and it'll link your node to your user directory. And you will be able to use node with sudo.
sudo ln -s "$(which node)" "/usr/local/bin/node"
sudo ln -s "$(which npm)" "/usr/local/bin/npm"
I don't know if this is the right way, but this is what i did...
sudo su
export PATH=$PATH:/home/ec2-user/local/node/bin
curl http://npmjs.org/install.sh | sh
chown -R ec2-user /home/ec2-user/local/node
exit
This installed npm, and I can now install any packages I want.

Resources