Tag Archives: ubuntu16.04

VBox install Ubuntu 16.04 shared folder suddenly fails Error: error: unrecognized command line option ‘- fstack protector strong’

Cause investigation

#gcc -v

Found version 4.7.7

but

Installing the above enhanced software requires the gcc5.0 provided with 16.04 Version 4

Solution:

1  sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 100
2  sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.7 50
3  sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5 100
4  sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.7 50
Then Re-install
#./autorun.sh
Done!

[Solved] after installing Ubuntu 16.04, you cannot enter the graphical interface after restarting (error/dev/sda2: clean…)

Environment: machine with independent graphics card 2060

After installing Ubuntu 16.04, you can’t enter the graphical interface, and you’re stuck in this interface all the time

Error reported:/dev/sda2: clean******

Solution:

In the current interface, enter the command line mode and execute the following commands (in the command line mode, press Ctrl + Alt + F1 ~ F6, mine is Ctrl + Alt + F1, try it yourself)

1. Uninstall the installed graphics card driver

sudo apt purge nvidia-*

sudo apt autoremove

2. Search for matching driver version

ubuntu-drivers devices

A matching drive will be displayed, such as 430 or 438

3. Installation

Sudo apt get install nvidia-430 (for example, if the matching driver shown above is 430)

4. Reboot and restart

[PIP command error] after upgrading the PIP in Ubuntu 16.04, execute the PIP command to report an error sys.stderr.write (F “error: {exc}”)

Get the repair file get-pip.py

    Access get repair file

    Find the download link of the corresponding version file, such as Python 3.5, https://bootstrap.pypa.io/pip/3.5/get-pip.py

    Download using WGet, WGet https://bootstrap.pypa.io/pip/3.5/get-pip.py

    Execute the file using the corresponding version of python, Python 3.5 get pip. Py

Ubuntu 16.04 troubleshooting MySQL error [How to Solve]

problem description

Ubuntu 16.04 errors are reported when installing the MySQL server and MySQL client. In order to make the description as simple as possible, take MySQL client as an example:

$ sudo apt install mysql-client

## ubuntu 16.04 It is recommended to use apt for all operations


## Omit a bunch of prompts and go straight to the error message

...
Unselected package mysql-client is being selected.
(The database is being read ... The system currently has 277491 files and directories installed.)
Preparing to unpack ... /mysql-client_5.7.15-0ubuntu0.16.04.1_all.deb ...
Unpacking mysql-client (5.7.15-0ubuntu0.16.04.1) ...
Setting up mysql-common (5.7.15-0ubuntu0.16.04.1) ...
update-alternatives: error: candidate path /etc/mysql/my.cnf.fallback does not exist
dpkg: Error processing package mysql-common (--configure).
 Subprocess installed post-installation script returned error status 2
dpkg: Dependency issues prevented the configuration of libmysqlclient20:amd64 from continuing.
 libmysqlclient20:amd64 depends on mysql-common (>= 5.5); however.
  Package mysql-common has not been configured.

dpkg: Error processing package libmysqlclient20:amd64 (--configure).
 Dependency issue - still not configured
dpkg: Dependency problem preventing configuration of libmysqlclient-dev from continuing.
 libmysqlclient-dev depends on libmysqlclient20 (= 5.7.15-0ubuntu0.16.04.1); however.
  Package libmysqlclient20:amd64 is not yet configured.

dpkg: Error processing package libmysqlclient-dev (--configure).
 Dependency issue - still not configured
dpkg: Dependency issue preventing mysql-client-5.7 configuration from continuing.
 mysql-client-5.7 depends on mysql-common (>= 5.5); however.
  Package mysql-common has not been configured.

dpkg: Error processing package mysql-client-5.7 (--configure).
 Dependency issue - still not configured
dpkg: Dependency issue preventing mysql-client configuration from continuing.
 mysql-client � The apport report was not written because the error message indicated that this was an error due to a previous issue.
                                                                                   No apport report was written because the error message indicated that this was an error due to a previous issue.
                                              The apport report was not written because the MaxReports limit was reached.
                                                                                                  The apport report was not written because the MaxReports limit was reached.
                                              Relies on mysql-client-5.7; however.
  Package mysql-client-5.7 has not been configured.

dpkg: Error processing package mysql-client (--configure).
 Dependency issue - still not configured
An error occurred while processing.
 mysql-common
 libmysqlclient20:amd64
 libmysqlclient-dev
 mysql-client-5.7
 mysql-client
E: Sub-process /usr/bin/dpkg returned an error code (1)

Error reporting focuses on:

update-alternatives: Error: candidate path /etc/mysql/my.cnf.fallback does not exist
dpkg: Error while processing package mysql-common (--configure).

Error information in English version:

update-alternatives: error: alternative path /etc/mysql/my.cnf.fallback doesn't exist dpkg: error processing package mysql-common (--configure):

solution:

mkdir MYSQL
cd MYSQL
sudo apt download mysql-common
ar xvf mysql*
tar xvf dat*
sudo cp ./etc/mysql/my.cnf.fallback /etc/mysql/my.cnf.fallback
sudo dpkg -i mysql*deb 
cd
sudo apt -f install

Note:

1. If there is no/etc/mysqlThis file is truncated to create yourself

2.If version < Ubuntu

 

 

[Solved] Ubuntu16.04 Start up Error: tpm_tis: A TPM error

“tpm_tis: A TPM error (6) occurred attempting to read a pcr value”.
Information about TPMhttps://wiki.archlinux.org/index.php/TPM
If you not need TPM, just
echo blacklist tpm_tis > /etc/modprobe.d/tpm_tis.conf (need root)
It worked on my computer. The error gone.

$sudo vim /etc/modprobe.d/tpm_tis.conf

Enter the following: blacklist tpm_tis

Additional options:

just activate the security chip in the bios, that should work, too. similar to whatRikTwrote, on my thinkpad the error message was gone after i enabled the security chip in the bios, changing it frominactivetoactive. so it seems you can get rid of the error message by either activating or disabling the security chip.

Ubuntu16.04 Install python-ldap error: command ‘x86_64-linux-gnu-gcc’ failed with exit status 1

First perform:

sudo apt-get install libldap2-dev
sudo apt-get install libsasl2-dev

Then execute, OK:

pip install python-ldap

参考博文内容:

These are the steps to be followed to install python-ldap in Ubuntu. At first,

sudo apt-get install python-ldap

would throw the following error

In file included from Modules/LDAPObject.c:4:0:
Modules/common.h:10:20: fatal error: Python.h: No such file or directory compilation terminated.
error: command 'gcc' failed with exit status 1

To get past this error, we need to install python-dev package

sudo apt-get install python-dev

After installing that we ll get the following error

In file included from Modules/LDAPObject.c:9:0:
Modules/errors.h:8:18: fatal error: lber.h: No such file or directory
compilation terminated.

To get past this error, we need to install ldap2-dev package

sudo apt-get install libldap2-dev

After installing that we ll get the following error

Modules/LDAPObject.c:18:18: fatal error: sasl.h: No such file or directory compilation terminated.
error: command 'gcc' failed with exit status 1

To get past this error, we need to install libsasl2-dev package

sudo apt-get install libsasl2-dev

After that

sudo apt-get install python-ldap

should install python-ldap without any problems.

Ubuntu16.04: How to Solve “no java virtual machine was found after searching the following locations:” Error

How to solve the problem of “no Java virtual machine was found after searching the following locations” in Ubuntu 16.04

First install JDK (Oracle official website), and then check whether the installation is successful

As shown in the figure:

After downloading the Mars version of eclipse, it is found that it cannot be opened normally, and the error message is shown in the following figure:
0

A Java Runtime Environment (JRE) or Java Development Kit (JDK)
must be available in order to run Eclipse. No Java virtual machine
was found after searching the following locations:
/home/leblancs/Software/eclipse/jre/bin/java
java in your current PATH

After analyzing the error, eclipse did not find JRE, so it reported an error

solution:

CD to the installation directory of eclipse, establish a soft connection and connect to JRE,
ln – S/ here is the installation directory of JDK /JRE JRE

Start eclipse successfully

Nginx Error when installing the startup service failed to start a high performance web server and a reverse proxy serve

Nginx Error when installing the startup service failed to start a high performance web server and a reverse proxy serve
ubuntu16.04
apt update
apt install -y nginx
service nginx start
Error:

root@zabbix:/home/appliance# systemctl status nginx.service

nginx.service - A high performance web server and a reverse proxy server
   Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Wed 2018-07-25 18:33:26 UTC; 1min 27s ago
  Process: 30040 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=1/FAILURE)
  Process: 30037 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS)

Jul 25 18:33:25 zabbix nginx[30040]: nginx: [emerg] listen() to [::]:80, backlog 511 failed (98: Address already in use)
Jul 25 18:33:25 zabbix nginx[30040]: nginx: [emerg] listen() to 0.0.0.0:80, backlog 511 failed (98: Address already in use)
Jul 25 18:33:25 zabbix nginx[30040]: nginx: [emerg] listen() to [::]:80, backlog 511 failed (98: Address already in use)
Jul 25 18:33:26 zabbix nginx[30040]: nginx: [emerg] listen() to 0.0.0.0:80, backlog 511 failed (98: Address already in use)
Jul 25 18:33:26 zabbix nginx[30040]: nginx: [emerg] listen() to [::]:80, backlog 511 failed (98: Address already in use)
Jul 25 18:33:26 zabbix nginx[30040]: nginx: [emerg] still could not bind()
Jul 25 18:33:26 zabbix systemd[1]: nginx.service: Control process exited, code=exited status=1

Jul 25 18:33:26 zabbix systemd[1]: *******Failed to start A high performance web server*** and a reverse proxy server.****

Jul 25 18:33:26 zabbix systemd[1]: nginx.service: Unit entered failed state.
Jul 25 18:33:26 zabbix systemd[1]: nginx.service: Failed with result 'exit-code'.

Error reason: you already have a process bound to HTTP port 80. You can run the command sudo lsof - I: 80 to get the list of processes using this port, and then stop/disable the web server
solution: you can run the command to stop the process using port 80 sudo fuser - K 80/TCP