Author Archives: Robins

[How to Fix] error: file ‘/boot/grub/i386-pc/normal.mod’ not found

Error: file ‘/boot/grub/ i386-PC/Normal.mod ‘not found
The partition was formatted when installing The Ubuntu system. After the installation, the boot error appeared: file ‘/boot/ GRUB/i386-PC/Normal.mod ‘not found
grub rescue> Interface,
I tried ls (HD0, MSDOS1) (HD0, MSDOS2) to find the Linux partition, but my computer’s ls (HD0, MSDOS1) returned unknown filesysem, so I could not find the corresponding Linux partition
So we did it in a different way:
Repair with the Boot Repair tool,
Use a usb flash drive with Ubuntu to boot, insert the usb flash drive in the way of installing the system, press ESC (or F11, F12 depending on your computer model) to launch the usb flash drive, and then select TRY Ubuntu (do not install Ubuntu) to enter the Ubuntu system:
1. Connect to the network
2. Open the terminal
3. Enter a command
sudo add-apt-repository ppa:yannubuntu/boot-repair & & sudo apt-get update
sudo apt-get install -y boot-repair & & boot-repair
4, click repair, complete, restart the computer is good
Attached is the Boot Repair website with detailed instructions
https://sourceforge.net/p/boot-repair/home/Home/

cenos Upgrade g++ gcc(cc1plus: error: unrecognized command line option “-std=c++11”)

Building with ‘g++’.

Error using mex

cc1plus: error: unrecognized command line option “-std=c++11”

1, download the source code

is here. To be on the safe side, 4.8.5 is selected. If you need another version, just change the version number

$wget HTTP:// ftp://ftp.gnu.org/gnu/gcc/gcc-4.8.5/gcc-4.8.5.tar.gz
2. Download dependency package & pre-installed

compiling and installing GCC depends on the MPC, MPFR, GMP package. Fortunately, GCC source script can easily download the dependency package.

$tar ZXF gcc-4.8.5.tar. Gz

$CD GCC – 4.8.5

$ ./contrib/download_prerequisites

You can see in this script that the version Numbers of the dependent packages are MPC-0.8.1, MPFR-2.4.2, gMP-4.3.2, in that order.
3, $yum -y install glibc-devel. I686 –setopt=protected_multilib=false
4. Compile and install

$ cd .. // The main reason for doing this is to create the build folder outside of the source code

$mkdir GCC – build – 4.8.5

$mkdir /usr/local/gcc-4.8.5 // include file.

$mkdir/usr/local/GCC// placed bin +.lib file

$CD GCC – build – 4.8.5

$ ../gC-4.8.5 /configure –prefix=/usr/local/ gC-4.8.5 –exec-prefix=/usr/local/ GCC –enable-languages= C, C ++ // To save time, only C and C ++ are compiled here

$ make & & make install

in order to avoid multiple versions of GCC in the system after installation, the directory to compile and install is directly specified under /usr/local/4.8.5 and /usr/local/gcc. If no -prefix is specified, it will be installed under /usr/local by default.

to wait

make after a long wait, done

5, environment variable configuration

rename GCC /g++ and keep the old version

$mv /usr/bin/ GCC /usr/bin/ GCC -4.4.7

$mv /usr/bin/g++ /usr/bin/g++-4.4.7

$export PATH=/usr/local/ GCC /bin:$PATH # use the latest GCC /g++;

confirm version number

$ g++ –version

$ gcc –version

$ which g++

$ which gcc

error

1. Build folder to the wrong location stubs-32. H cannot be found, CentOS is 64 bit

compilation terminated.

make[5]: *** [_muldi3.o] Error 1

make[5]: Leaving directory ‘/home/wei/gcc-4.8.5/gcc-build-4.8.5/x86_64-unknown linux-gnu/32/libgcc’

…………………

solution: install a 32-bit glibb-devel that ignores multiple versions of a piece of software.

$ yum -y install glibc-devel.i686 –setopt=protected_multilib=false

is a new build folder in the source tree and needs to be used in a separate folder. The solution is to create a new folder outside of the source code, the resolved code has been updated to the above.

First, we highly recommend that GCC be built into a separate directory from the sources whichdoes not reside within the source tree. This is how we generally build GCC; Building where srcdir == objdir should still work, but doesn’t get extensive testing; building where objdir is a subdirectory of srcdir is unsupported.

C++ Error: allocating an object of abstract class type

The questions are as follows:
All functions in the parent class Dad are pure virtual functions; defining the subclass Son; allocating an Object of abstract class type “XXX”;
The reasons are as follows:
At instantiation time:
(a) It is important to ensure that all pure virtual functions of the superclass are implemented, otherwise the subclasses still cannot be instantiated;
(b) The inherited virtual function must be guaranteed to have the input type of the function and the return value type is consistent, otherwise the virtual function of the parent class is not instantiated;
(c) When the enumerated type inside the class ACTS as the function parameter type, the subclass needs to define itself, otherwise the type is inconsistent;

SSHD key_read error report solution

The status quo described
In the afternoon, I found that the connection between my Xshell and the server node was inexplicably broken. After checking the system log, I found a large number of following errors:

May 15 17:58:08 yanta sshd[15213]: error:key_read: uudecode AAAAB3NzaC1yc2...........

The solution
After querying the solution on the network, it is found that the IP in error and the string in the corresponding error message can be found in the file /root/.ssh/known_hosts, and it is ok to delete it
. However, after checking the information on the server again, it is found that there is no corresponding one, and the encoded string is completely different.
After looking at /root/.ssh/authorized_keys, I find that one of the keys is consistent with the error message, so I first backup the file:

# cp authorized_keys authorized_keys.bk

After careful examination of the key, it was found that a complete key was originally divided into several parts, leading to the incomplete key when SSH login, so there was no error message after re-copying and pasting the key information on this machine.

Error: cannot fetch last explain plan from plan_table

OS: Solaris 10
DB: 10.2.0.3
today encountered such a strange thing, using dbms_xplan.display a SQL execution plan, “Error: cannot fetch last explain plan from plan_table”. At the beginning think Plan_table version is out of date, also did not look carefully, then regenerate Plan_table, just run SQL, or report the same error, so it is not Plan_table version of the problem, will it be the SQL itself?Change SQL: select sysdate from Dual, dbMS_xplan.display to display the correct result, run the SQL in question again, the error still remains. Judging from the above phenomenon, that should be the problem with SQL itself.
analyze the SQL in question, mainly several views, these views are based on db link, db link side of the data version is 9.2.0.8, could this be caused by this reason?Delete the 10G plan_table, run the 9i UTlxplan.sql, and run the statement with the problem just now, dbMS_xplan.display displays the result normally.
there is another method, manually update the plan_id field in the 10G plan_table, set the plan_id in the record to a value, dbms_xplan.display can display the result normally.

From “ITPUB blog” link: http://blog.itpub.net/45188/viewspace-1022784/, if you want to reprint, please indicate the source, otherwise will be investigated for legal responsibility.

Reproduced in: http://blog.itpub.net/45188/viewspace-1022784/

Fatal error C1853 error occurs when there are mixed .c files in the VS project

Fatal error C1853 appears in VS project with.c file mixed in
The CPP files in the project after the C file and an error occurs at compile time fatal error C1853: “the debug/1 _1. PCH” is not a precomplied header file with this complier…
Reason for error: This error is because when the.cpP and.c files are mixed in the project, the compiler compiles them differently (mainly because of the way it handles function declarations) and cannot share the same precompiled header file.
In VC++, the default precompiled header is for C++ (stdafx.h and stdafx.cpp), but it is also possible to create precompiled headers for C. Interestingly, in older versions of VC++, the error message was misleading: fatal error C1853: ‘XXX. PCH’ is not a precompiled header file created with this compiler. It’s often confusing. It should be said that this tip in the new edition is an improvement. However, a search of the Internet on this issue is often recommended for the entire project to remove the precompiled header setting. This is clearly not a good solution. For a large project, using precompiled headers can significantly reduce the total compile time. Therefore, it is a better solution to leave the precompiled header Settings. Search MSDN, for different situations, there can be different solutions:
Plan 1
This applies if the vast majority of files are.cpP or.c.
In this case, it would be more balanced to set a few files of different classes to not use precompiled headers by:
For VC++6.0, right-click the.c (or.cpp) file in the FileView to uncompile, select Settings, and on the right side of the dialog box, select category as precompiled headers, and set the option not using… ;
For VS2005, right-click on the corresponding file in the Solution Explorer and select Properties, and set Not using… under preHeaders. Can.
If you need to set more than one file, hold down the Ctrl key and select both files and set.

Scheme 2
If you have a large number of files affected, disabling precompilation headers on all of them will still make the overall compilation speed of the project much slower than it would otherwise be. Consider creating a dedicated precompiled header for this set of files. In very early versions of VC++ (1.5 and before), it was possible to create precompiled headers for.c and.cpp in a single project, but later versions only supported separate precompiled headers. In this case, we can set up a new Static Library project in the workspace (or Solution), add all.c files to the project and compile them separately, so that we can create a precompiled header for.c files in the Static Library. But to do so requires that the code that is separated logically belongs to the same module in order to be maintainable. From a design point of view, however, this requirement is generally met; otherwise, consider the overall design of the project 😛 And finally, don’t forget to set the original project’s dependency as a separate static library project.

MSP-EXP430F5529LP: Error initializing emulator: No USB FET was found

Under normal circumstances, TI MSP430LaunchPad drivers can be automatically installed after CCS is installed. MSP Application UART and MSP Debug Interface. Of course, the unusual case is a driver installation Error, which naturally happens when you download a program: Error initializing emulator: No USB FET was found.
The MSP430F5529 USB LaunchPad Evaluation Kit is TI’s latest LaunchPad and features the awesome EZ-FET Lite, but the driver aspect may not be complete yet. Msp-exp430f5529lp requires the current latest CCSv5.5 installation. Generally speaking, after installing CCS and connecting MSP-EXP430F5529LP, the driver will be installed successfully automatically, and the LaunchPad can be debugged using CCS normally. You may also be prompted to update or fix firmware, as long as you follow the CCS prompt.

If the automatic installation fails, congratulations. The solution is as follows:

Is under the Win7 system, some computers can not use MSP430 board, computer prompt serial port drive installation problem. The reason is that there is a file in the computer system: USbser.sys, which is placed in the directory C:\Windows\System32\drivers. As long as you copy the USbser.sys file into the previous directory and manually upgrade the driver, the installation file can be directed to browse to the oEM51.inf file in the attachment below, the installation can be successful.

Reference link:

http://bbs.eeworld.com.cn/thread-334052-1-1.html

http://www.deyisupport.com/question_answer/microcontrollers/msp430/f/55/t/52735.aspx

Attachment download:

http://download.csdn.net/detail/wanruoqingkong/6960593

You can also download the attachment in link 1.

Error:Your request produced an error.[newNullResponse]

The reason for this error when entering the AppStore may be that the system time has been manually modified. The solution is to change Settings – general – Date and time – back to “automatic Settings”
Another function method of developing iOS App” Rate my App” by link App Store review page:
itms-apps://itunes.apple.com/app/idXXXXXX
XXXXXX==> Your own appID

The following errors may be reported when testing this feature in an emulator:
LaunchServices: ERROR: There is no registered handler for URL scheme itms-apps
Solution: Just test with a real machine

“%Error opening tftp://255.255.255.255/network config”

Problem: Service Configuration Error Messages

sometimes displays similar Error Messages during Cisco IOS software startup of a Cisco device:
% Error opening TFTP:// 255.255.255.255/network – confg (Socket Error) % Error opening TFTP:// 255.255.255.255 cisconet CFG (Socket Error) % Error opening TFTP:// 255.255.255.255/3620 – confg (Socket Error) % Error opening TFTP:// 255.255.255.255/3620. CFG (Socket Error)
A practical example:
% SYS – 4 – CONFIG_RESOLVE_FAILURE: System config parse the from (TFTP:// 255.255.255.255 cisconet. CFG) failed
These error messages are related to the default service configuration options built into Cisco IOS software, which attempts to access the service configuration file from the (TFTP) server.
View configuration:
Type the show Run command
———————–
Router#show run
Building configuration…

Current configuration : 7722 bytes
!
version 15.4
service config
service timestamps log datetime msec
service timestamps log datetime msec
service password-encryption
.
———————–
Solutions:
To turn this feature off, the router enters global command no Service config

Router#config terminal
Enter configuration commands, one per line.  

Router(config)#no service config

Router(config)#exit

Router#copy running-config startup-config

Which error messages will not appear after the router’s next restart.

Reproduced in: https://www.cnblogs.com/MomentsLee/p/10294016.html

Error while instantiating ‘org.apache.spark.sql.hive.HiveExternalCatalog’:

Using Spark-shell to connect to external Hive, the following error occurs:

[diao@hadoop111 spark-2.1.1]$ bin/spark-shell 
19/08/13 14:15:52 WARN NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
19/08/13 14:15:57 WARN HiveConf: HiveConf of name hive.conf.hidden.list does not exist
19/08/13 14:15:59 WARN HiveConf: HiveConf of name hive.conf.hidden.list does not exist
java.lang.IllegalArgumentException: Error while instantiating 'org.apache.spark.sql.hive.HiveSessionState':
  at org.apache.spark.sql.SparkSession$.org$apache$spark$sql$SparkSession$$reflect(SparkSession.scala:981)
  at org.apache.spark.sql.SparkSession.sessionState$lzycompute(SparkSession.scala:110)
  at org.apache.spark.sql.SparkSession.sessionState(SparkSession.scala:109)
  at org.apache.spark.sql.SparkSession$Builder$$anonfun$getOrCreate$5.apply(SparkSession.scala:878)
  at org.apache.spark.sql.SparkSession$Builder$$anonfun$getOrCreate$5.apply(SparkSession.scala:878)
  at scala.collection.mutable.HashMap$$anonfun$foreach$1.apply(HashMap.scala:99)
  at scala.collection.mutable.HashMap$$anonfun$foreach$1.apply(HashMap.scala:99)
  at scala.collection.mutable.HashTable$class.foreachEntry(HashTable.scala:230)
  at scala.collection.mutable.HashMap.foreachEntry(HashMap.scala:40)
  at scala.collection.mutable.HashMap.foreach(HashMap.scala:99)
  at org.apache.spark.sql.SparkSession$Builder.getOrCreate(SparkSession.scala:878)
  at org.apache.spark.repl.Main$.createSparkSession(Main.scala:96)
  ... 47 elided
Caused by: java.lang.reflect.InvocationTargetException: java.lang.IllegalArgumentException: Error while instantiating 'org.apache.spark.sql.hive.HiveExternalCatalog':
  at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
  at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
  at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
  at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
  at org.apache.spark.sql.SparkSession$.org$apache$spark$sql$SparkSession$$reflect(SparkSession.scala:978)
  ... 58 more
Caused by: java.lang.IllegalArgumentException: Error while instantiating 'org.apache.spark.sql.hive.HiveExternalCatalog':
  at org.apache.spark.sql.internal.SharedState$.org$apache$spark$sql$internal$SharedState$$reflect(SharedState.scala:169)
  at org.apache.spark.sql.internal.SharedState.<init>(SharedState.scala:86)
  at org.apache.spark.sql.SparkSession$$anonfun$sharedState$1.apply(SparkSession.scala:101)
  at org.apache.spark.sql.SparkSession$$anonfun$sharedState$1.apply(SparkSession.scala:101)
  at scala.Option.getOrElse(Option.scala:121)
  at org.apache.spark.sql.SparkSession.sharedState$lzycompute(SparkSession.scala:101)
  at org.apache.spark.sql.SparkSession.sharedState(SparkSession.scala:100)
  at org.apache.spark.sql.internal.SessionState.<init>(SessionState.scala:157)
  at org.apache.spark.sql.hive.HiveSessionState.<init>(HiveSessionState.scala:32)
  ... 63 more
Caused by: java.lang.reflect.InvocationTargetException: java.lang.reflect.InvocationTargetException: java.lang.RuntimeException: java.lang.RuntimeException: The root scratch dir: /opt/modules/hive on HDFS should be writable. Current permissions are: rwxrwxr-x
  at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
  at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
  at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
  at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
  at org.apache.spark.sql.internal.SharedState$.org$apache$spark$sql$internal$SharedState$$reflect(SharedState.scala:166)
  ... 71 more

Modify the Hive-site.xml file
Prefixes the value with HDFS :// hadoOP111:8020

<property>
    <name>hive.exec.scratchdir</name>
    <value>hdfs://hadoop111:8020/opt/moules/hive</value>
  </property>

It will run successfully after modification

[diao@hadoop111 spark-2.1.1]$ bin/spark-shell 
19/08/13 14:22:32 WARN NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
19/08/13 14:22:38 WARN HiveConf: HiveConf of name hive.conf.hidden.list does not exist
19/08/13 14:22:40 WARN HiveConf: HiveConf of name hive.conf.hidden.list does not exist
19/08/13 14:22:42 WARN ObjectStore: Failed to get database global_temp, returning NoSuchObjectException
Spark context Web UI available at http://192.168.253.111:4040
Spark context available as 'sc' (master = spark://hadoop111:7077, app id = app-20190813142233-0003).
Spark session available as 'spark'.
Welcome to
      ____              __
    /__/__  ___ _____/ /__
    _\ \/ _ \/ _ `/ __/  '_/
   /___/ .__/\_,_/_/ /_/\_\   version 2.1.1
      /_/
         
Using Scala version 2.11.8 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_202)
Type in expressions to have them evaluated.
Type :help for more information.

Local workspace file (‘angular.json’) could not be found.

The following error was reported while running ng serve

Local workspace file ('angular.json') could not be found.
Error: Local workspace file ('angular.json') could not be found.
    at WorkspaceLoader._getProjectWorkspaceFilePath (D:\nodejs\node_global\node_modules\@angular\cli\models\workspace-loader.js:44:
19)
    at WorkspaceLoader.loadWorkspace (D:\nodejs\node_global\node_modules\@angular\cli\models\workspace-loader.js:31:21)
    at ServeCommand._loadWorkspaceAndArchitect (D:\nodejs\node_global\node_modules\@angular\cli\models\architect-command.js:201:32)
    at ServeCommand.<anonymous> (D:\nodejs\node_global\node_modules\@angular\cli\models\architect-command.js:53:25)
    at Generator.next (<anonymous>)
    at D:\nodejs\node_global\node_modules\@angular\cli\models\architect-command.js:7:71
    at new Promise (<anonymous>)
    at __awaiter (D:\nodejs\node_global\node_modules\@angular\cli\models\architect-command.js:3:12)
    at ServeCommand.initialize (D:\nodejs\node_global\node_modules\@angular\cli\models\architect-command.js:52:16)
    at Object.<anonymous> (D:\nodejs\node_global\node_modules\@angular\cli\models\command-runner.js:127:23)

Error cause: Possible angular/ CLI version mismatch
Solutions:
Upgrade presents/cli
Uninstall Angular/CLI globally

npm uninstall -g @angular/cli

2. Clean up

npm cache verify

Install Angular/CLI globally

npm install -g @angular/cli@latest

4. Uninstall Angluar/CLI under the project path

npm uninstall --save-dev @angular/cli

5. Install under the project path:

npm install --save-dev @angular/[email protected]

6. NPM install or YARN Install under the project path
7. Fix the problem after NPM installation:

npm audit fix

8. Resolve “Angular. Json” related issues:

ng update @angular/cli --migrate-only --from=1.4.9

 

Reproduced in: https://www.cnblogs.com/shira-t/p/9759142.html