error while running the comannd 'psql' Error: You must install at least one postgresql-client-<version> package - postgresql

When I run vagrant ssh and login successfully then try the ~$psql command, I get this error: Error: You must install at least one postgresql-client-<version> package.
I saw a similar question here and I ran this command:
~$ sudo apt-get install postgresql-client
The output:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
libpq5 postgresql-client-9.1
Suggested packages:
postgresql-9.1 postgresql-doc-9.1
The following NEW packages will be installed:
libpq5 postgresql-client postgresql-client-9.1
0 upgraded, 3 newly installed, 0 to remove and 66 not upgraded.
Need to get 1,057 kB/1,063 kB of archives.
After this operation, 3,448 kB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Err http://us.archive.ubuntu.com/ubuntu/ precise-updates/main libpq5 amd64 9.1.5-0ubuntu12.04
404 Not Found [IP: 91.189.91.23 80]
Err http://security.ubuntu.com/ubuntu/ precise-security/main libpq5 amd64 9.1.5-0ubuntu12.04
404 Not Found [IP: 91.189.88.149 80]
Err http://security.ubuntu.com/ubuntu/ precise-security/main postgresql-client-9.1 amd64 9.1.5-0ubuntu12.04
404 Not Found [IP: 91.189.88.149 80]
Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/p/postgresql-9.1/libpq5_9.1.5-0ubuntu12.04_amd64.deb 404 Not Found [IP: 91.189.88.149 80]
Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/p/postgresql-9.1/postgresql-client-9.1_9.1.5-0ubuntu12.04_amd64.deb 404 Not Found [IP: 91.189.88.149 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
I tried the suggested fix missing too but didn't work.
How can I install a postgresql package successfully? And mainly how can I get the $psql command to give me the desired output showed in the picture?
(Edit) I tried the first answer's suggestion:
vagrant#precise64:~$ apt-get update
E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)
E: Unable to lock directory /var/lib/apt/lists/
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
Then tried the solutions mentioned here :
vagrant#precise64:~$ ps aux | grep apt
vagrant 1144 0.0 0.2 11676 948 pts/0 S+ 18:59 0:00 grep --color=auto apt
I don't understand so I don't know what's next.

looks like you had some trouble installing several packages 404 Not Found.
Do sudo apt-get update and then retry the install.

Related

brew services start mongodb-community#4.2 Error: Unknown command: services

I am trying to run MongoDB by running brew services start mongodb-community#4.2 but I am getting the error that you see below:
jaimes-mbp:SMR jaimemontoya$ brew services start mongodb-community#4.2
==> Tapping homebrew/services
Cloning into '/usr/local/Library/Taps/homebrew/homebrew-services'...
remote: Enumerating objects: 27, done.
remote: Counting objects: 100% (27/27), done.
remote: Compressing objects: 100% (19/19), done.
remote: Total 27 (delta 0), reused 16 (delta 0), pack-reused 0
Unpacking objects: 100% (27/27), done.
Checking connectivity... done.
Tapped 0 formulae (63 files, 276K)
Error: Unknown command: services
jaimes-mbp:SMR jaimemontoya$
Isn't brew the command, and services only a parameter? I am not understanding why the error says that services is an unknown command. Thank you.
UPDATE 1: I see two warnings when I try to run brew install mongodb-community#4.2 again. Maybe that has something to do with the problem?:
jaimes-mbp:SMR jaimemontoya$ brew install mongodb-community#4.2
Warning: mongodb/brew/mongodb-community-4.2.3 already installed
Warning: You are using OS X 10.15.
We do not provide support for this pre-release version.
You may encounter build failures or other breakages.
UPDATE 2: When I use mongo, it is doing something:
jaimes-mbp:SMR jaimemontoya$ mongo
MongoDB shell version v4.2.3
connecting to: mongodb://127.0.0.1:27017/?compressors=disabled&gssapiServiceName=mongodb
2020-03-13T06:41:22.073-0600 E QUERY [js] Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed: SocketException: Error connecting to 127.0.0.1:27017 :: caused by :: Connection refused :
connect#src/mongo/shell/mongo.js:341:17
#(connect):2:6
2020-03-13T06:41:22.076-0600 F - [main] exception: connect failed
2020-03-13T06:41:22.076-0600 E - [main] exiting with code 1
jaimes-mbp:SMR jaimemontoya$
Maybe I do not need to use brew services start mongodb-community#4.2? I thought it was necessary to run MongoDB Community Edition.
UPDATE 3: I run ps aux | grep -v grep | grep mongod and it returns nothing. I am trying to verify that MongoDB is running, so I am searching for mongod in my running processes but it returns nothing, meaning that MongoDB is not running I guess.
UPDATE 4: See what happens when I run brew doctor --verbose:
Warning: You are using OS X 10.15.
We do not provide support for this pre-release version.
You may encounter build failures or other breakages.
Warning: Your Homebrew is outdated.
You haven't updated for at least 24 hours. This is a long time in brewland!
To update Homebrew, run `brew update`.
Warning: The /usr/local directory is not writable.
Even if this directory was writable when you installed Homebrew, other
software may change permissions on this directory. Some versions of the
"InstantOn" component of Airfoil are known to do this.
You should probably change the ownership and permissions of /usr/local
back to your user account.
sudo chown -R $(whoami):admin /usr/local
When I run sudo chown -R $(whoami):admin /usr/local, I get this:
jaimes-mbp:SMR jaimemontoya$ sudo chown -R $(whoami):admin /usr/local
Password:
chown: /usr/local: Operation not permitted
jaimes-mbp:SMR jaimemontoya$
brew update is not working:
jaimes-mbp:SMR jaimemontoya$ brew update
Error: The /usr/local directory is not writable.
Even if this directory was writable when you installed Homebrew, other
software may change permissions on this directory. Some versions of the
"InstantOn" component of Airfoil are known to do this.
You should probably change the ownership and permissions of /usr/local
back to your user account.
sudo chown -R $(whoami):admin /usr/local
jaimes-mbp:SMR jaimemontoya$
Seems like you are facing issue with brew.
Run brew doctor --verbose to check if the brew is working fine.
And then brew update to update the brew version.
After this run, brew services list to display all the services in the brew.
If you see mongodb-community#4.2 there in the list, then run brew services start mongodb-community#4.2
It should work.
I followed the advice MikeMcQuaid provided at https://github.com/Homebrew/brew/issues/3665:
You need to uninstall and install Homebrew using
https://github.com/Homebrew/install
As explained at https://github.com/Homebrew/install, I first ran /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)". After that I ran /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)".
Then I ran this:
jaimes-mbp:SMR jaimemontoya$ brew tap mongodb/brew
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
No changes to formulae.
==> Tapping mongodb/brew
Cloning into '/usr/local/Homebrew/Library/Taps/mongodb/homebrew-brew'...
remote: Enumerating objects: 86, done.
remote: Counting objects: 100% (86/86), done.
remote: Compressing objects: 100% (76/76), done.
remote: Total 145 (delta 41), reused 21 (delta 10), pack-reused 59
Receiving objects: 100% (145/145), 30.18 KiB | 2.16 MiB/s, done.
Resolving deltas: 100% (68/68), done.
Tapped 6 formulae (33 files, 83.0KB).
jaimes-mbp:SMR jaimemontoya$ brew install mongodb-community#4.2
==> Installing mongodb-community from mongodb/brew
==> Downloading https://fastdl.mongodb.org/osx/mongodb-macos-x86_64-4.2.3.tgz
######################################################################## 100.0%
==> Caveats
To have launchd start mongodb/brew/mongodb-community now and restart at login:
brew services start mongodb/brew/mongodb-community
Or, if you don't want/need a background service you can just run:
mongod --config /usr/local/etc/mongod.conf
==> Summary
🍺 /usr/local/Cellar/mongodb-community/4.2.3: 21 files, 304.3MB, built in 1 minute 54 seconds
jaimes-mbp:SMR jaimemontoya$ brew services start mongodb-community#4.2
==> Tapping homebrew/services
Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-services'...
remote: Enumerating objects: 88, done.
remote: Counting objects: 100% (88/88), done.
remote: Compressing objects: 100% (47/47), done.
remote: Total 691 (delta 31), reused 69 (delta 25), pack-reused 603
Receiving objects: 100% (691/691), 192.79 KiB | 1.68 MiB/s, done.
Resolving deltas: 100% (270/270), done.
Tapped 1 command (39 files, 266.3KB).
==> Successfully started `mongodb-community` (label: homebrew.mxcl.mongodb-community)
jaimes-mbp:SMR jaimemontoya$ ps aux | grep -v grep | grep mongod
jaimemontoya 17763 0.1 0.2 5544164 38300 ?? S 8:11AM 0:00.65 /usr/local/opt/mongodb-community/bin/mongod --config /usr/local/etc/mongod.conf
jaimes-mbp:SMR jaimemontoya$
It works!

AWS ECS task can't access outbound

I created docker image that based on ubuntu:18.04
Maybe I think ECS task cannot access to outbound.
When I execute apt-get update, it throw errors.
root#ip-172-31-14-71:~# apt-get install -y wget
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libpsl5 publicsuffix
The following NEW packages will be installed:
libpsl5 publicsuffix wget
0 upgraded, 3 newly installed, 0 to remove and 2 not upgraded.
Need to get 455 kB of archives.
After this operation, 1320 kB of additional disk space will be used.
Err:1 http://archive.ubuntu.com/ubuntu bionic/main amd64 libpsl5 amd64 0.19.1-5build1
Could not connect to archive.ubuntu.com:80 (91.189.88.162), connection timed out Could not connect to archive.ubuntu.com:80 (91.189.88.149), connection timed out Could not connect to archive.ubuntu.com:80 (91.189.88.152), connection timed out Could not connect to archive.ubuntu.com:80 (91.189.88.161), connection timed out
Err:2 http://archive.ubuntu.com/ubuntu bionic/main amd64 publicsuffix all 20180223.1310-1
Unable to connect to archive.ubuntu.com:http:
Ign:3 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 wget amd64 1.19.4-1ubuntu2.2
Err:3 http://security.ubuntu.com/ubuntu bionic-updates/main amd64 wget amd64 1.19.4-1ubuntu2.2
Unable to connect to archive.ubuntu.com:http:
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/libp/libpsl/libpsl5_0.19.1-5build1_amd64.deb Could not connect to archive.ubuntu.com:80 (91.189.88.162), connection timed out Could not connect to archive.ubuntu.com:80 (91.189.88.149), connection timed out Could not connect to archive.ubuntu.com:80 (91.189.88.152), connection timed out Could not connect to archive.ubuntu.com:80 (91.189.88.161), connection timed out
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/p/publicsuffix/publicsuffix_20180223.1310-1_all.deb Unable to connect to archive.ubuntu.com:http:
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/w/wget/wget_1.19.4-1ubuntu2.2_amd64.deb Unable to connect to archive.ubuntu.com:http:
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
root#ip-172-31-14-71:~# apt-get install -y wget
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libpsl5 publicsuffix
The following NEW packages will be installed:
libpsl5 publicsuffix wget
0 upgraded, 3 newly installed, 0 to remove and 2 not upgraded.
Need to get 455 kB of archives.
After this operation, 1320 kB of additional disk space will be used.
Err:1 http://archive.ubuntu.com/ubuntu bionic/main amd64 libpsl5 amd64 0.19.1-5build1
Could not connect to archive.ubuntu.com:80 (91.189.88.152), connection timed out Could not connect to archive.ubuntu.com:80 (91.189.88.161), connection timed out Could not connect to archive.ubuntu.com:80 (91.189.88.162), connection timed out Could not connect to archive.ubuntu.com:80 (91.189.88.149), connection timed out
Err:2 http://archive.ubuntu.com/ubuntu bionic/main amd64 publicsuffix all 20180223.1310-1
Unable to connect to archive.ubuntu.com:http:
Ign:3 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 wget amd64 1.19.4-1ubuntu2.2
Err:3 http://security.ubuntu.com/ubuntu bionic-updates/main amd64 wget amd64 1.19.4-1ubuntu2.2
Unable to connect to archive.ubuntu.com:http:
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/libp/libpsl/libpsl5_0.19.1-5build1_amd64.deb Could not connect to archive.ubuntu.com:80 (91.189.88.152), connection timed out Could not connect to archive.ubuntu.com:80 (91.189.88.161), connection timed out Could not connect to archive.ubuntu.com:80 (91.189.88.162), connection timed out Could not connect to archive.ubuntu.com:80 (91.189.88.149), connection timed out
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/p/publicsuffix/publicsuffix_20180223.1310-1_all.deb Unable to connect to archive.ubuntu.com:http:
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/w/wget/wget_1.19.4-1ubuntu2.2_amd64.deb Unable to connect to archive.ubuntu.com:http:
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
wget to google.com also failed.
I do not configure any firewalls or related about that.
Is there any configuration for ECS task?

Upgrade to postgres96 on Alpine (/usr/bin/pg_dump: No such file or directory)

I'm trying to upgrade postgres locally so I don't get a version mismatch error. This is what i do:
echo "http://dl-5.alpinelinux.org/alpine/v3.5/main" >> /etc/apk/repositories;
apk update
bash-4.3# apk add postgresql-dev
(1/4) Installing libressl2.4-libtls (2.4.4-r0)
(2/4) Installing libressl-dev (2.4.4-r0)
(3/4) Installing postgresql-libs (9.6.5-r0)
(4/4) Installing postgresql-dev (9.6.5-r0)
Executing busybox-1.24.2-r13.trigger
OK: 353 MiB in 108 packages
bash-4.3# pg_dump
bash: /usr/bin/pg_dump: No such file or directory
I'm at a loss - any idea what the problem is please?
Just a guess but I guess you've not installed postgresql. In order to use the pg_dump you must have installed this, or if you do have it already and I'm wrong try reinstalling it like so:
bash-4.3# apk del postgresql
(1/4) Purging postgresql (9.6.5-r0)
(2/4) Purging postgresql-client (9.6.5-r0)
(3/4) Purging libedit (20170329.3.1-r2)
(4/4) Purging libxml2 (2.9.4-r4)
Executing busybox-1.26.2-r5.trigger
OK: 37 MiB in 25 packages
bash-4.3# apk add postgresql
(1/4) Installing libedit (20170329.3.1-r2)
(2/4) Installing postgresql-client (9.6.5-r0)
(3/4) Installing libxml2 (2.9.4-r4)
(4/4) Installing postgresql (9.6.5-r0)
Executing busybox-1.26.2-r5.trigger
OK: 53 MiB in 29 packages
bash-4.3# pg_dump
pg_dump: [archiver (db)] connection to database "root" failed: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
bash-4.3#
As you can see from above pg_dump is working because it is in the postgresql package even though as listed on alpine packages site it should be within the postgresql-client package as shown here but it doesn't work unless postgres is installed. If you can't have a full postgres installation, I recommend this workaround which is a bit unclean, install postgres, backup the pg_dump binary, uninstall postgres then restore pg_dump like so:
bash-4.3# apk add postgresql
(1/2) Installing libxml2 (2.9.4-r4)
(2/2) Installing postgresql (9.6.5-r0)
Executing busybox-1.26.2-r5.trigger
OK: 53 MiB in 29 packages
bash-4.3# cp /usr/bin/pg_dump /usr/bin/pg_dump
pg_dump pg_dumpall
bash-4.3# cp /usr/bin/pg_dump /usr/bin/pg_dump.back
bash-4.3# cp /usr/bin/pg_dumpall /usr/bin/pg_dumpall.back
bash-4.3# apk del postgresql
(1/2) Purging postgresql (9.6.5-r0)
(2/2) Purging libxml2 (2.9.4-r4)
Executing busybox-1.26.2-r5.trigger
OK: 38 MiB in 27 packages
bash-4.3# mv /usr/bin/pg_dump.back /usr/bin/pg_dump
bash-4.3# mv /usr/bin/pg_dumpall.back /usr/bin/pg_dumpall
bash-4.3# pg_dump
pg_dump: [archiver (db)] connection to database "root" failed: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
bash-4.3#
It is not ideal but it has worked for me in the past

Cannot launch emulator on Linux (Ubuntu 15.10)

I try to launch emulator but it outputs into log:
libGL error: unable to load driver: r600_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: r600
libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast
X Error of failed request: GLXBadContext
Major opcode of failed request: 155 (GLX)
Minor opcode of failed request: 6 (X_GLXIsDirect)
Serial number of failed request: 47
Current serial number in output stream: 46
libGL error: unable to load driver: r600_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: r600
libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast
X Error of failed request: GLXBadContext
Major opcode of failed request: 155 (GLX)
Minor opcode of failed request: 6 (X_GLXIsDirect)
Serial number of failed request: 47
Current serial number in output stream: 46
libGL error: unable to load driver: r600_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: r600
libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast
X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 155 (GLX)
Minor opcode of failed request: 24 (X_GLXCreateNewContext)
Value in failed request: 0x0
Serial number of failed request: 33
Current serial number in output stream: 34
QObject::~QObject: Timers cannot be stopped from another thread emulator: WARNING: Increasing RAM size to 1GB
How to fix it? I read topics with similar errors but it doesn't help me.
Using the libstdc++.so.6 that is available in your system instead of the one bundled with the android sdk solves this issue.
The emulator has a switch -use-system-libs to do this.
~/Android/Sdk/tools/emulator -avd Nexus_5_API_23 -use-system-libs
Alternatively you can set the ANDROID_EMULATOR_USE_SYSTEM_LIBS environment variable to 1 for your user/system. This has the benefit of making sure that the emulator will work even if you launched it from within Android Studio.
More details: https://code.google.com/p/android/issues/detail?id=197254#c15
$ cd Android/Sdk/emulator/lib64/libstdc++
$ mv libstdc++.so.6 libstdc++.so.6.bak
$ ln -s /usr/lib64/libstdc++.so.6
it's worked for me
Take a look at
https://code.google.com/p/android/issues/detail?id=197254
in particular items #3 and #19. This is a workaround rather than a true solution, but it got me moving again. You will have to adjust the command for:
the location of the libstdc++.so.6 file on your system - I used locate libstdc++.so.6 to find this
the path to the emulator executable
the name of your emulator
so my command was
LD_PRELOAD='/usr/lib/x86_64-linux-gnu/libstdc++.so.6' ~/Android/Sdk/tools/emulator -netdelay none -netspeed full -avd Nexus_5_API_21
This then launches the emulator, and you can select it in the 'Device Chooser' dialogue when you run your app.
I have a similar error in Ubuntu 16.04 64-bit.
For me the answer #23 solution works great
https://code.google.com/p/android/issues/detail?can=2&start=0&num=100&q=&colspec=ID%20Status%20Priority%20Owner%20Summary%20Stars%20Reporter%20Opened&groupby=&sort=&id=197254
$ cd $ANDROID_HOME/android-sdk-linux_x86/tools/lib64/libstdc++
$ mv libstdc++.so.6 libstdc++.so.6.bak
$ ln -s /usr/lib64/libstdc++.so.6 $ANDROID_HOME/android-sdk-linux_x86/tools/lib64/libstdc++
Use "Software" in the Emulated Performance Graphics option, in the AVD settings. Very simple solution.
i do this and it's working
cd ~/Android/Sdk/emulator/lib64/libstdc++
mv libstdc++.so.6 libstdc++.so.6.bak
ln -s /usr/lib/x86_64-linux-gnu/libstdc++.so.6 libstdc++.so.6
better locate your system default libstdc++.so.6 using the command
locate libstdc++.so.6
And Then Take a back up of the android sdk version of the file in ~/Android/Sdk/tools/lib64/libstdc++/
And create a soft link for libstdc++.so.6 with the same name in the above path replacing the existing one pointing to the default file in the system
This way we do not need restart the emulator every time from command line.
Try to change graphics option in Emulator settings:
I was also having a lot of problems to launch AVD on my machine. Struggled with using system libs, creating symlinks to local libraries, etc...
What really made it work for me was to install the nvidia drivers with
sudo apt install nvidia-340
My distro (note I'm not using Ubuntu 15.10):
$ uname -a
Linux ruapehu 4.4.0-38-generic #57-Ubuntu SMP Tue Sep 6 15:42:33 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
$ cat /etc/issue
Ubuntu 16.04.1 LTS \n \l
Make sure you check the nvidia package suitable for you, as Ubuntu offers different flavors. For instance:
$ sudo apt list "nvidia-[0-9][0-9][0-9]"
Listing... Done
nvidia-304/xenial 304.131-0ubuntu3 amd64
nvidia-331/xenial 340.96-0ubuntu3 amd64
nvidia-340/xenial,now 340.96-0ubuntu3 amd64 [installed]
nvidia-346/xenial 352.63-0ubuntu3 amd64
nvidia-352/xenial 361.42-0ubuntu2 amd64
nvidia-361/xenial,now 361.42-0ubuntu2 amd64
I tested the list in a bottom-up strategy, from 361 until I found one that worked (340, in my case).
Hope that helps.
In my case (Ubuntu 16.10 64-bit, Android Studio 2.3) libs were located in another place. So commands are:
/home/myusername/Android/Sdk/emulator/lib64/libstdc++
➜ libstdc++ ll
total 9,3M
-rwxr-xr-x 1 myusername myusername 4,6M мар 21 00:09 libstdc++.so.6
-rwxr-xr-x 1 myusername myusername 4,6M мар 21 00:09 libstdc++.so.6.0.18
➜ libstdc++ mv libstdc++.so.6 libstdc++.so.6.bak
➜ libstdc++ mv libstdc++.so.6.0.18 libstdc++.so.6.0.18.bak
➜ libstdc++ ln -s /usr/lib32/libstdc++.so.6 /home/myusername/Android/Sdk/emulator/lib64/libstdc++
➜ libstdc++ ln -s /usr/lib32/libstdc++.so.6.0.22 /home/myusername/Android/Sdk/emulator/lib64/libstdc++
➜ libstdc++ ll
total 9,3M
lrwxrwxrwx 1 myusername myusername 25 мар 29 13:18 libstdc++.so.6 -> /usr/lib32/libstdc++.so.6
-rwxr-xr-x 1 myusername myusername 4,6M мар 21 00:09 libstdc++.so.6.0.18.bak
lrwxrwxrwx 1 myusername myusername 30 мар 29 13:19 libstdc++.so.6.0.22 -> /usr/lib32/libstdc++.so.6.0.22
-rwxr-xr-x 1 myusername myusername 4,6M мар 21 00:09 libstdc++.so.6.bak
And now emulator is launched from AVD manager normally.
I had the similar problems with using i965_dri.so and swrast_dri.so, I wasn't able to change to software graphics in the GUI.
So I went to the emulator's folder (Show on Disk link in AVDM) and found the config.ini
Here I just changed the following line to stop it from using GPU:
hw.gpu.enabled=no
This is fixed in Android Emulator 27.2.9. See the first fix listed here:
https://developer.android.com/studio/releases/emulator#fixes
$ cd ~/Android/Sdk/emulator/lib64/libstdc++
$ mv libstdc++.so.6 libstdc++.so.6.bak
$ ln -s /usr/lib/x86_64-linux-gnu/libstdc++.so.6 libstdc++.so.6

yum installation manager not working in centos 6.6

I'm facing a problem with yum installation manager in centos 6.6
root#mmopuru:~ # cat /etc/*release
CentOS release 6.6 (Final)
CentOS release 6.6 (Final)
CentOS release 6.6 (Final)
root#mmopuru:~ # uname -a
Linux mmopuru.puppetlabs.vm 2.6.32-504.el6.i686 #1 SMP Wed Oct 15 03:02:07 UTC 2014 i686 i686 i386 GNU/Linux
Its throwing following err. I tried clean all but no use.
root#mmopuru:~ # yum install python-pip
Loaded plugins: fastestmirror, security
Setting up Install Process
Repository 'updates' is missing name in configuration, using id
Loading mirror speeds from cached hostfile
* epel: ftp.cuhk.edu.hk
* ius: ftp.neowiz.com
* remi-safe: mirror.innosol.asia
* update: mirror.nbrc.ac.in
http://mirror.centos.org/centos/6/addons/i386/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: addons. Please verify its path and try again
How to resolve this?
When I run yum repolist
root#mmopuru:~ # yum repolist
Loaded plugins: fastestmirror, security
Repository 'updates' is missing name in configuration, using id
Loading mirror speeds from cached hostfile
epel/metalink | 4.0 kB 00:00
* epel: ftp.cuhk.edu.hk
* ius: mirror.amsiohosting.net
* remi-safe: mirrors.thzhost.com
* update: mirror.nbrc.ac.in
http://mirror.centos.org/centos/6/addons/i386/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.
http://mirror.centos.org/centos/6/addons/i386/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.
epel | 4.3 kB 00:00
epel/primary_db | 4.9 MB 00:05
ius | 2.2 kB 00:00
ius/primary_db | 194 kB 00:01
remi-safe | 2.9 kB 00:00
remi-safe/primary_db | 22 kB 00:00
update | 3.4 kB 00:00
update/primary_db | 3.7 MB 00:01
repo id repo name status
addons CentOS-6 - Addons 0
*epel Extra Packages for Enterprise Linux 6 - i386 9,857
ius IUS Community Packages for Enterprise Linux 6 - i386 356
remi-safe Safe Remi's RPM repository for Enterprise Linux 6 - i386 32
update CentOS-6 - Updates 989
repolist: 11,234
The content of /etc/yum.repos.d/centos-internal.repo is
root#mmopuru:~ # cat /etc/yum.repos.d/centos-internal.repo
# CentOS-Base.repo
#
# This file uses a new mirrorlist system developed by Lance Davis for CentOS.
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#
[base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/PM-GPG-KEY-CentOS-6
#released updates
enabled=0
[update]
name=CentOS-$releasever - Updates
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/PM-GPG-KEY-CentOS-6
#packages used/produced in the build but not released
[addons]
name=CentOS-$releasever - Addons
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons
#baseurl=http://mirror.centos.org/centos/$releasever/addons/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/PM-GPG-KEY-CentOS-6
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/PM-GPG-KEY-CentOS-6
#additional packages that extend functionality of existing packages
enabled=0
[centosplus]
name=CentOS-$releasever - Plus
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/PM-GPG-KEY-CentOS-6
#contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
#baseurl=http://mirror.centos.org/centos/$releasever/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/PM-GPG-KEY-CentOS-6
Remove the "addons" repository definition, which doesn't exists for CentOS 6 (it only exists for CentOS 5, but is empty).
I have just answered a similar question i.e. same error but for EPEL repo. I am answering here, may be it can come helpful for some future SO user.
Solution: The quick fix is to update your SSL certificates:
yum -y upgrade ca-certificates
Chances are the above error may also occur while certificate update, if so, just disable the repo i.e. addons which is causing the error, use the following command:
yum -y upgrade ca-certificates --disablerepo=addons
In case you're getting this same error for a different repo, just put it's name against the --disablerepo=<repo-name> flag.
Note: use sudo if you're not the root user.